28.07.2013, 11:23
Hallo,
I want that if a player looks through the visor of a sniper, the names of the other players are displayed. I tried it just as it is not somehow
I want that if a player looks through the visor of a sniper, the names of the other players are displayed. I tried it just as it is not somehow
pawn Код:
if(GetPlayerWeapon(playerid) == 34 && !IsPlayerInAnyVehicle(playerid))
{
new PlayerText3D:snipertext[MAX_PLAYERS];
if(PRESSED(KEY_HANDBRAKE))
{
for(new i; i<MAX_PLAYERS;i++)
{
if(IsPlayerConnected(i))
{
new Float:X, Float:Y, Float:Z;
GetPlayerPos(i, X, Y, Z);
new string[128];
format(string,sizeof(string),"%s",PName[i]);
snipertext[i] = CreatePlayer3DTextLabel(playerid,string,0x008080FF,X,Y,Z+1,315.0,i);
}
}
}
else if(RELEASED(KEY_HANDBRAKE))
{
for(new i; i<MAX_PLAYERS;i++)
{
DeletePlayer3DTextLabel(playerid,snipertext[i]);
}
}
}