SetPlayerMarkerForPlayer - 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: SetPlayerMarkerForPlayer (
/showthread.php?tid=308990)
SetPlayerMarkerForPlayer -
Gooday - 05.01.2012
Hi, thats my 911 call system:
pawn Код:
CMD:911(playerid,params[])
{
//911 system
if(isnull(params)) return SendClientMessage(playerid,COLOR_LIGHTBLUE,"Usage: /911 [Message and Location]");
new name[24];
new sendername[MAX_PLAYER_NAME], string[128];
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(playerid,name,24);
new playername[MAX_PLAYER_NAME];
GetPlayerName(playerid, playername, sizeof(playername));
SendClientMessage(playerid, COLOR_GOLD, "[INFO]You have just called 911. Please remain at your location and wait.");
for(new i=0;i<MAX_PLAYERS;i++)
{
if(GetPlayerSkin(i) == 285 || GetPlayerSkin(i) == 282 || GetPlayerSkin(i) == 281 || GetPlayerSkin(i) == 283 || GetPlayerSkin(i) == 288 ||GetPlayerSkin(i) == 278 || GetPlayerSkin(i) == 275 || GetPlayerSkin(i) == 279 || GetPlayerSkin(i) == 277 || GetPlayerSkin(i) == 274 || GetPlayerSkin(i) == 276)
{
format(string, sizeof(string), "-------------------------------------------------------------------------------------------------", sendername, params);
SendClientMessageToAll(COLOR_GREY, string);
format(string, sizeof(string), "DISPATCH", sendername, params);
SendClientMessageToAll(COLOR_ROYALBLUE, string);
format(string, sizeof(string), "Be advised, the following is a 911 call.", sendername, params);
SendClientMessageToAll(COLOR_GREY, string);
format(string, sizeof(string), "Units aviable please respond.", sendername, params);
SendClientMessageToAll(COLOR_GREY, string);
format(string, sizeof(string), "CALLER: %s ~ INFO & LOCATION: %s", sendername, params);
SendClientMessageToAll(COLOR_GREY, string);
format(string, sizeof(string), "-------------------------------------------------------------------------------------------------", sendername, params);
SendClientMessageToAll(COLOR_GREY, string);
}
}
return 1;
}
How i can make a command who shows a red marker at the location of the caller and a command like /removemarker who remove it when someone is arrived?
Re: SetPlayerMarkerForPlayer -
Lee_Percox - 06.01.2012
The removemarker you can either make as a command or in OnPlayerEnterCheckPoint.
Either way:
https://sampwiki.blast.hk/wiki/SetPlayerCheckpoint <-- That's to learn how to set it (Unless you use a streamer) (Loop through all players with a for(new i = 0; i < MAX_PLAYERS; i++) if you wish to make every player see it, then add your IsPlayerConnected and PD checks
and:
https://sampwiki.blast.hk/wiki/DisablePlayerCheckpoint <-- That's how to disable the checkpoint, add that in:
https://sampwiki.blast.hk/wiki/OnPlayerEnterCheckpoint Or add it to your command you make.
CMD:removecheckpoint(playerid, params[]) {
DisablePlayerCheckpoint(playerid);
return 1;
}
The rest you can look into yourself, to gather more experience.
Re: SetPlayerMarkerForPlayer -
Gooday - 06.01.2012
Ye but can someone post a example please i need it