Problem mit /duty

Wichtiger Hinweis: Bitte ändert nicht manuell die Schriftfarbe auf schwarz sondern belasst es bei der Standardeinstellung. Somit tragt ihr dazu bei dass euer Text auch bei Verwendung unseren dunklen Forenstils noch lesbar ist!

Tipp: Ihr wollt längere Codeausschnitte oder Logfiles bereitstellen? Benutzt unseren eigenen PasteBin-Dienst Link
  • HeyHoo,


    Ich hab mir grade nen /duty-Befehl gebastelt.
    Nur leider spuckt er mir immer "SERVER:Unknown command." aus....
    hier einmal der Command:

    if(isPlayerInFrakt(playerid,1))
    {
    if(IsPlayerInRangeOfPoint(playerid,2,237.1750,110.2013,1003.2188))
    {
    if(strcmp(cmdtext,"/duty",true)==0)
    {
    SetPlayerColor(playerid,SFPDBlau);
    GivePlayerWeapon(playerid,3,1);
    GivePlayerWeapon(playerid,24,70);
    GivePlayerWeapon(playerid,29,300);
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    SetPVarInt(playerid,"OnDuty",1);
    }
    }
    }
    if(isPlayerInFrakt(playerid,1))
    {
    if(IsPlayerInRangeOfPoint(playerid,2,237.1750,110.2013,1003.2188))
    {
    if(strcmp(cmdtext,"/duty",true)==0)
    {
    if(GetPVarInt(playerid,"OnDuty")==1)
    {
    SetPlayerColor(playerid,Weiss);
    ResetPlayerWeapons(playerid);
    SetPlayerArmour(playerid,0);
    SetPlayerHealth(playerid,100);
    }
    }
    }
    }


    MfG
    Deagle


  • if(isPlayerInFrakt(playerid,1))
    {
    if(IsPlayerInRangeOfPoint(playerid,2,237.1750,110.2013,1003.2188))
    {
    if(strcmp(cmdtext,"/duty",true)==0)
    {
    SetPlayerColor(playerid,SFPDBlau);
    GivePlayerWeapon(playerid,3,1);
    GivePlayerWeapon(playerid,24,70);
    GivePlayerWeapon(playerid,29,300);
    SetPlayerHealth(playerid,100);
    SetPlayerArmour(playerid,100);
    SetPVarInt(playerid,"OnDuty",1);
    return 1;
    }
    }
    }
    if(isPlayerInFrakt(playerid,1))
    {
    if(IsPlayerInRangeOfPoint(playerid,2,237.1750,110.2013,1003.2188))
    {
    if(strcmp(cmdtext,"/duty",true)==0)
    {
    if(GetPVarInt(playerid,"OnDuty")==1)
    {
    SetPlayerColor(playerid,Weiss);
    ResetPlayerWeapons(playerid);
    SetPlayerArmour(playerid,0);
    SetPlayerHealth(playerid,100);
    return 1;
    }
    }
    }
    }


    immernoch diese sh1t meldung...
    was is denn das?

  • Falls du ocmd nutzt:


    ocmd:duty(playerid, params[])
    {
    #pragma unused params
    if(GetPVarInt(playerid,"duty"))
    {
    if(isPlayerInFrakt(playerid,8))
    {
    if(IsPlayerInRangeOfPoint(playerid,1,219.3335,1855.8004,12.9870))
    {
    ResetPlayerWeapons(playerid);
    SetPlayerArmour(playerid,0);
    DeletePVar(playerid,"Duty");
    //SqlSetInt(playerid,"duty",0);


    }
    }
    return 1;
    }
    else
    {
    if(isPlayerInFrakt(playerid,8))
    {
    if(IsPlayerInRangeOfPoint(playerid,1,219.3335,1855.8004,12.9870))
    {
    GivePlayerWeapon(playerid,16,10);
    GivePlayerWeapon(playerid,24,70);
    GivePlayerWeapon(playerid,29,300);
    GivePlayerWeapon(playerid,31,400);
    GivePlayerWeapon(playerid,25,50);
    GivePlayerWeapon(playerid,34,20);
    GivePlayerWeapon(playerid,46,3);
    GivePlayerMoney(playerid,-5000);
    //SqlSetInt(playerid,"duty",1);
    SetPVarInt(playerid,"Duty",1);
    }
    }
    return 1;
    }
    }

    Back to the roots!