dcmd´s gehen nicht

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
  • bei mir geht es immer noch nicht nur die normal heist: /acmds oder /work
    aber nicht solche: /**** <Id>
    wo man Id eintippen muss:


    Hier mal ein befehl


    dcmd_rob(playerid,params[])
    {
    #define SCM SendClientMessage
    new Float:health,string[128],robbedcash, robbedname[MAX_PLAYER_NAME], robbername[MAX_PLAYER_NAME],id,Float: x,Float: y,Float: z;
    if(gTeam[playerid] == TEAM_POLICE) return SCM(playerid,red,"ERROR: "lgrey"You are a "lyellow2"cop"lgrey", so you can't rob!");
    if(sscanf(params,"u",id)) return SCM(playerid,orange,"USAGE: /rob [playerid]");
    GetPlayerPos(id,x,y,z);
    GetPlayerHealth(id,health);
    GetPlayerName(playerid, robbername, sizeof(robbername));
    GetPlayerName(id, robbedname, sizeof(robbedname));
    format(string,sizeof(string),"ERROR: "lgrey"You aren't close enough to "lyellow2"%s"lgrey"!",robbedname);
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,red,"ERROR: "lgrey"The ID specified is not connected!");
    if(RecentlyRobbed[id] == 1) return SCM(playerid,red,"ERROR: "lgrey"That player has already been recently robbed!");
    if(RobbedRecently[playerid] == 1) return SCM(playerid,red,"ERROR: "lgrey"Please wait before robbing anyone again!");
    if(id == playerid) return SendClientMessage(playerid,red,"ERROR: "lgrey"You can't rob yourself...");
    if(!IsPlayerInRangeOfPoint(playerid,6.0,x,y,z)) return SendClientMessage(playerid,red,string);
    if(IsPlayerInAnyVehicle(playerid)) return SCM(playerid,red,"ERROR: "lgrey"Please get out of your vehicle");
    if(IsPlayerInAnyVehicle(id)) return SCM(playerid,red,"ERROR: "lgrey"This player is in a vehicle");
    if(PInfo[playerid][Jailed] == 1) return SendClientMessage(playerid,red,"ERROR: "lgrey"You are jailed, and you can't rob.");
    if(health <= 0) return SendClientMessage(playerid,red,"ERROR: "lgrey"This player is dead!");
    if(wallet[id] > 0)
    {
    wallet[id]--;
    SendFMessage(id,red,"*** %s has tried to rob you, you have $%d left on your wallet!",robbername,wallet[id]);
    SendFMessage(playerid,red,"** %s has a wallet. You failed to rob him!",robbedname);
    PlayerPlaySound(id,1190,0.0,0.0,0.0);
    PlayerPlaySound(playerid,1190,0.0,0.0,0.0);
    ClearRobbed[0] = SetTimerEx("robbedrecently",120000,false,"i",playerid);
    ClearRobbed[1] = SetTimerEx("recentlyrobbed",120000,false,"i",id);
    RecentlyRobbed[id] = 1;
    RobbedRecently[playerid] = 1;
    SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+3);
    return 1;
    }
    if(GetPlayerMoney(id) > 50)
    {
    robbedcash = random(GetPlayerMoney(id));
    }
    else return SendClientMessage(playerid,red,"ERROR: "lgrey"That player is poor!");
    format(string, sizeof(string), "*** You've robbed "lgrey"$%d"lyellow" from "lgrey"%s(ID:%d)"lyellow"!", robbedcash, GetPName(id), id);
    SendClientMessage(playerid, yellow, string);
    format(string, sizeof(string), "*** You have been robbed "lgrey"$%d"lyellow" from "lgrey"%s(ID:%d)"lyellow"!", robbedcash,robbername,playerid);
    SendClientMessage(id, yellow, string);
    format(string, sizeof(string), "******** "lyellow"%s(ID:%d) has robbed "lgrey"$%d"lyellow" from "lgrey"%s(ID:%d)"lyellow"! ********", robbername,playerid, robbedcash,GetPName(id),id);
    SendCopMessage(red,string);
    GivePlayerMoney(playerid, robbedcash);
    GivePlayerMoney(id, -robbedcash);
    ClearRobbed[0] = SetTimerEx("robbedrecently",120000,false,"i",playerid);
    ClearRobbed[1] = SetTimerEx("recentlyrobbed",120000,false,"i",id);
    RecentlyRobbed[id] = 1;
    RobbedRecently[playerid] = 1;
    SetPlayerWantedLevel(playerid,GetPlayerWantedLevel(playerid)+3);
    return 1;
    }




    dcmd_ticket(playerid,params[])
    {
    new id,string[150];
    if(gTeam[playerid] != TEAM_POLICE) return SendClientMessage(playerid,red,"ERROR: "lgrey"You aren't a police man!");
    if(sscanf(params,"u",id)) return SendClientMessage(playerid,red,"USAGE: "lgrey"/ticket [id]");
    if(GetPlayerWantedLevel(id) == 0) return SendClientMessage(playerid,red,"ERROR: "lgrey"That player doesn't need a ticket!");
    if(GetPlayerWantedLevel(id) > 2) return SendClientMessage(playerid,red,""lgrey"That player needs to be arrested!"lyellow2"(/arrest)");
    format(string,sizeof(string),"WARNING: "lgrey"Cop "lyellow2"%s(ID:%d) "lgrey"gave you a "lred"ticket"lgrey"! You have "lyellow2"60 "lgrey"seconds to pay!"lyellow2"(/pay)",GetPName(playerid),playerid);
    SendClientMessage(id,red,string);
    SendFMessage(playerid,red,"» "lorange"You gave "lyellow2"%s(ID:%d)"lorange"a ticket, he has "lyellow2"60 "lorange"seconds to pay!",GetPName(id),id);
    Ticket[id] = SetTimerEx("ticket",60000,false,"i",id);
    Ticketid[id] = playerid;
    hastickettopay[playerid] = 1;
    return 1;
    }