07.05.2011, 03:57
If I'm correct, none of the above solutions will work correctly, since it's only setting the player's marker for one player. I may be wrong, however if not, you should use a loop to go through the players and set the player marker to invisible:
Also, may I ask, why are you using a variable to store a player's wanted level? There are functions that set and get a player's wanted level. Check them out:
https://sampwiki.blast.hk/wiki/GetPlayerWantedLevel
https://sampwiki.blast.hk/wiki/SetPlayerWantedLevel
pawn Код:
for( new i = 0; i < MAX_PLAYERS; i++ ) {
// Loop through players. If they're not connected, move to next loop step
if( !IsPlayerConnected( i ) ) continue;
// Make "playerid" marker invisible for player "i"
SetPlayerMarkerForPlayer( i, playerid, 0xFFFFFF00 );
// playerid would be the player whose color is being set to invisible
// I'm assuming you're using this under a timer or public function, so
// you should be fine there
}
https://sampwiki.blast.hk/wiki/GetPlayerWantedLevel
https://sampwiki.blast.hk/wiki/SetPlayerWantedLevel