Set marker for skins
#1

Heyho community,
here we go again with one of my questions XD.

There is following problem:
I just made this code:
Код:
    if (!strcmp("/lvtaxi",cmdtext,true))
    {
    SendClientMessage(playerid,0xFF800096,"you called a taxi and your playermarker is shown on the minimap so the driver can find you!");
    SendClientMessage(playerid,0xFF800096,"type '/canceltaxi' to cancel your call for a taxi!");
    SendClientMessageToSkin(234, 0x00FF4096, "DISPATCH: call for a taxi recieved! the caller is marked 'lightgreen'on the minimap");
    for(new i = 0; i < MAX_PLAYERS; i++)
    
    SetPlayerMarkerForPlayer(i,playerid ,0x00FF00FF);
    }
okaay... it works well but that problem what i have is, that i dont want it to be shown for all players, but for one skin(234). I tried many things yet, but without success (that was really frustrating :/ )

But i still hope anybody here can help me XD
Thanks,
DeathOnaStick
Reply
#2

if(GetPlayerSkin(playerid) == 185)
{
do stuff
}
Reply
#3

nope... that doesnt work because "playerid" is the one who wrote the command... i want it to be the one who should get the Marker, and not the Player, who writes the command, itself.
Reply
#4

Does nobody know the sollution? Maybe have some alternatives to that? Really frustrating again :/
Reply
#5

Then use 'i'
Reply
#6

yes... and then?
When i try this i have:

Код:
if(GetPlayerSkin(i) == 185)
{
for(new i = 0; i < MAX_PLAYERS; i++)
SetPlayerMarkerForPlayer(i,playerid ,0x00FF00FF);
}
it still makes a marker for everybody, because i used "i" and when i would use "playerid" it would just make it for the one who sends the answer :/
Reply
#7

pawn Код:
for(new i = 0; i < MAX_PLAYERS; i++)
{
  if(GetPlayerSkin(i) == 185) SetPlayerMarkerForPlayer(i,playerid ,0x00FF00FF);
}
Reply
#8

kk thanks... working
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)