/bk DCMD fucked
#1

Okay,

So I made a /bk Cmd in DCMD. Only one slight Issue. It send "Police Use Only" to me even when Im in the NSP team, If I'm not it doesn't send ERROR.

I know im in the NSP team because all my other commands work.

pawn Код:
dcmd_bk(playerid,params[])
{
    new string[128];
    new location[MAX_ZONE_NAME];
    new chat[256];
    GetPlayer2DZone(playerid, location, MAX_ZONE_NAME);
    for(new i=0; i<MAX_PLAYERS; i++) {
    if(sscanf(params,"s",chat)) return SendClientMessage(playerid,COLOR_YELLOW,"ERROR: Police Use Only.");
    GetPlayerName(playerid, playername, sizeof(playername));
    if(PlayerTeam[playerid] == Team_NSP || PlayerTeam[playerid] == Team_LVPD) {
    format(string, sizeof(string), "-------------------------------------------------------------------------------------------------------------");
    SendMessageToLaw(string);
    format(string, sizeof(string), "POLICE DISPATCH (911 CALL)");
    SendMessageToEMS(string);
    format(string, sizeof(string), "Be advised. The following is a Priority One Call.");
    SendMessageToEMS(string);
    format(string, sizeof(string), "Officer Name: %s",playername);
    SendMessageToEMS(string);
    format(string, sizeof(string), "Officer ID: %d",playerid);
    SendMessageToEMS(string);
    format(string, sizeof(string), "Officer Need's Immediate Assistance");
    SendMessageToEMS(string);
    format(string, sizeof(string), "Officer location: %s",location);
    SendMessageToEMS(string);
    format(string, sizeof(string), "-------------------------------------------------------------------------------------------------------------");
    }
    }
    return 1;
}
Reply
#2

the "ERROR: Police use only", should be the "USAGE: /bk <blah>" instead, and what does this command do, do you have to type something extra on it? like /bk <something>
Reply
#3

If your not in the NSP team it dosent do anything. If you are. It sends ERROR: Police Use Only
Reply
#4

BUMP: Been over 12 hours, No response.

Please assist.
Reply
#5

Well firstoff, remove the loop.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)