08.05.2017, 17:50
Hello,
i'm trying to make a Backup Call function, where Police officer, can call a Backup, and for other Players will be tje Checkpoint showed. So far, i have done, but the Checkpoint, shows for me. Any ideas?
i'm trying to make a Backup Call function, where Police officer, can call a Backup, and for other Players will be tje Checkpoint showed. So far, i have done, but the Checkpoint, shows for me. Any ideas?
PHP код:
new OnDutyPD[MAX_PLAYERS] = 1;
PHP код:
else if(playertextid == Pdb[playerid][11]) // PDB Backup
{
new msg[128];
new jobz[128];
new name[MAX_PLAYER_NAME];
new Float:xback, Float:yback, Float:zback;
new id = GetPlayeridMid(name);
GetPlayerPos(playerid, xback, yback, zback);
if(playerDB[playerid][job] == 1) jobz= "PD";
GetPlayerName(playerid,vardas,MAX_PLAYER_NAME);
format(msg,sizeof(msg),"{FA8072}[INFO]{FFA500} %s (%s) calling a Backup!",name,jobz);
SendMessageToCopsBackup(playerid, id,Float:xback, Float:yback, Float:zback,COLOR,msg);
SendClientMessage(playerid, GREEN, "Police Backup is Called. Please wait.");
IsBackupCalled[playerid] = 1;
return 1;
}
PHP код:
stock SendMessageToCopsBackup(playerid, id,Float:xback, Float:yback, Float:zback,color,text[])
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(playerDB[i][job]==1)
{
SendClientMessage(i,color,text);
if(id == playerid)
{
return 1;
} else {
SetPlayerCheckpoint(i, xback, yback, zback, 20.0);
return 1;
}
}
}
}
return 1;
}