Hiding wrong player? - 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: Hiding wrong player? (
/showthread.php?tid=376285)
Hiding wrong player? -
[p3]pr0t0typ3 - 09.09.2012
Ok so i got this from the samp wiki and just added a SCM.
CMD:rco_hide(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "[PR0-RCON]Hiding you from radar...");
SetPlayerMarkerForPlayer(playerid,1,0xFFFFFF00); //What i got from wiki
}
else
{
SendClientMessage(playerid, -1, "SERVER:Unknown command");
}
return 1;
}
It does work but it doesnt hide the admin who uses it,it hides a random player,any help why this would be happening
Re: Hiding wrong player? -
RedJohn - 09.09.2012
What about
:
pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerMarkerForPlayer(i,playerid,0xFFFFFF00);
}
NOTE: Didn't tested!
EDIT: Fully command.
pawn Код:
CMD:rco_hide(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, COLOR_GREEN, "[PR0-RCON]Hiding you from radar...");
for(new i = 0; i < MAX_PLAYERS; i++)
{
SetPlayerMarkerForPlayer(i,playerid,0xFFFFFF00);
}
}
else
{
SendClientMessage(playerid, -1, "SERVER:Unknown command");
}
return 1;
}
Re: Hiding wrong player? -
Dizzle - 09.09.2012
Why dont you try RemovePlayerMarker(playerid); ?
Re: Hiding wrong player? - HuSs3n - 09.09.2012
Quote:
Originally Posted by Dizzle
Why dont you try RemovePlayerMarker(playerid); ?
|
lol ,this doesnt exist