28.04.2012, 16:56
I'm not sure, but if I remember good, you can't use spaces in commands, so you need to do it inside a command:
Been out of scripting for a while, but this code should work I guess.
pawn Code:
if(!strcmp(cmdtext, "/911-police", true, 11)) {
if(!strcmp(cmdtext[12], "187", true)) { // If the player typed /911-police 187
new string[128], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
SendClientMessage(playerid, -1, "Dispatcher: Ok, Please remain calm and stay at your location, assistance will be there shortly.");
format(string,sizeof string, "Police Dispatcher: All units, we have a Homicide at %s's location, Requesting EMS and Police for assistnace.",pName);
SendClientMessageToAll(0xFF0000AA,string);
}
if(!strcmp(cmdtext[12], "211", true)) { // If the player typed /911-police 211
// blabla
}
return 1;
}

