22.05.2009, 12:00
Hello guys, I'm pretty new to pawn, however through trial and error i manage to learn a lot.
However, i simply can't get this to work, so if you have the time, and wouldn't mind, I'd love to get a little hand understanding why it doesn't work.
To give you an idea of what i want to do:
I want to remove the nametag of everyone who's in the vehicle, including the driver.
Any help is appreciated.
However, i simply can't get this to work, so if you have the time, and wouldn't mind, I'd love to get a little hand understanding why it doesn't work.
Код:
if(!strcmp(cmd,"/hide",true))
{
if(IsPlayerInAnyVehicle(playerid))
{
new caridnice = GetPlayerVehicleID(playerid);
for(new i=0;i<MAX_PLAYERS;i++)
{
if(IsPlayerInVehicle(i, GetPlayerVehicleID(playerid)))
{
ShowPlayerNameTagForPlayer(i,playerid, 0);
}
ShowPlayerNameTagForPlayer(playerinfo[i][isadmin]>8,playerid, 1);
}
SendClientMessage(playerid,COLOR_GREY,"your nametag is now hidden");
}
else
return 1;
}
I want to remove the nametag of everyone who's in the vehicle, including the driver.
Any help is appreciated.


My logic was lost half way through the code but it's worth a try. I also gave an alternative - please see the comments for ShowPlayerNameTagForPlayer.