25.04.2010, 23:23
Hello, I've Tried making a command called /callhelp
work's perfect, only problem is, i cant set it to the police location
So just say i did /callhelp SFPD Need Backup!
It Would set a checkpoint where the officer is
and i only Want The Army to See The Checkpoint
I've Tried doing it and it doesn't work, it sets the checkpoint on the other side of the world
if you could help me please, it would be much appreciated =]
Heres teh code
work's perfect, only problem is, i cant set it to the police location
So just say i did /callhelp SFPD Need Backup!
It Would set a checkpoint where the officer is
and i only Want The Army to See The Checkpoint
I've Tried doing it and it doesn't work, it sets the checkpoint on the other side of the world
if you could help me please, it would be much appreciated =]
Heres teh code
pawn Код:
if(strcmp(cmdtext, "/callhelp", true, 9) == 0)
{
new Float:pX,Float:pY,Float:pZ;
IsSpawned[playerid] = 1;
if(!cmdtext[9])return SendClientMessage(playerid, COLOR_RED, "USAGE: /callhelp [location]");
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "Officer %s Is Requesting Help! [Location: %s] Respond To His Location Immediately!", str, cmdtext[9]);
SendClientMessageToArmy(COLOR_GREEN, str);
if(gTeam[playerid] == TEAM_ARMY)
{
SetPlayerCheckpoint(playerid, GetPlayerPos(playerid,pX,pY,pZ));
}
SendClientMessage(playerid,COLOR_BLUE,"The Army Has Been Notified Of Your Call, Please Wait At Your Current Location.");
return 1;
}