Remove Player Color - fast help
#1

When I put "SetPlayerColor" how i can make that on some command it Remove Player Color
Reply
#2

Well, in ZCMD it would be like this:

pawn Код:
command(removecolor, playerid, params[])
{
SetPlayerColor(playerid, -1)
return 1;
}
Reply
#3

if you remove a player's color, what are you expecting it to be? anyway, can't remove the color just change it.
Reply
#4

but i want to remove marker from map of players on that command ..
Reply
#5

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

pawn Код:
CMD:hidemarker(playerid, params[])
{
    new id;
    if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /hidemarker [playerid]");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000FF, "Player is not connected.");
    if(id == playerid) return SendClientMessage(playerid, 0xFF0000FF, "You cannot use this on yourself!");
    SetPlayerMarkerForPlayer(playerid, id, 0xFFFFFF00); //Makes other players marker invisible to you
    return 1;
}
I think this is what you're trying to do? :S

Read the wiki on how this function works.
Reply
#6

problem is that iI using foreach in that command... it need to look like this?

Код:
    SetPlayerMarkerForPlayer(playerid, id, 0xFFFFFF00); //Makes other players marker invisible to you
foreach specifier - " u "

is this right?
Код:
SetPlayerMarkerForPlayer(u, id, 0xFFFFFF00); //Makes other players marker invisible to you
Reply
#7

You are confusing foreach with sscanf, if you're making yourself invisible to everyone, use this:
pawn Код:
foreach(Player, i)
{
    SetPlayerMarkerForPlayer(i, playerid, 0xFFFFFF00);
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)