SA-MP Forums Archive
Backup System - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Backup System (/showthread.php?tid=589668)



Backup System - Oficer - 21.09.2015

Hey, Can someone add a timer to update the items in which we are every 3 seconds?

Code:
Quote:

if(strcmp(cmd,"/backup",true) == 0 || strcmp(cmd,"/bk",true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(IsACop(playerid))
{
if(PlayerInfo[playerid][pRequestingBackup] != 1)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "building: All units, %s %s %s is requesting backup, they have been marked on your GPS.", GetPlayerFactionName(playerid),GetPlayerRank(playe rid), sendername);
SendRadioMessage(1, TEAM_BLUE_COLOR, string);
SendRadioMessage(2, TEAM_BLUE_COLOR, string);
SendRadioMessage(3, TEAM_BLUE_COLOR, string);
PlayerInfo[playerid][pRequestingBackup] = 1;
for (new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsACop(i))
{
SetPlayerMarkerForPlayer(i, playerid, 0xFF0000FF);
}
}
}
SendClientMessage(playerid, TEAM_BLUE_COLOR, "Type /bkc to clear your backup request.");
SetTimerEx("BackupClear", 180000, false, "ii", playerid, 1);
}
else
{
SendClientMessage(playerid, COLOR_RED, "You already have an active backup request.");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "You are not a member of the MPD / FBI !");
}
}
return 1;


Sorry for my english.


Re: Backup System - Mowgli - 21.09.2015

no.

https://sampwiki.blast.hk/wiki/SetTimerEx


Re: Backup System - Oficer - 21.09.2015

Could you add me I am a debil, that you do not know how to deal with it