15.11.2013, 14:21
Will this code hide player's name after he will enter from 1 interior to another interior for example house, shop, casino...
pawn Код:
forward EntWithMask(playerid);
public EntWithMask(playerid)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(playerid))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new idx;
new cmd[256];
cmd = strtok(cmdtext, idx);
// Public commands.
if(strcmp("/enter", cmd, true) == 0) // enter property
{
if( lastPickup[playerid] != -1 || properties[lastPickup[playerid]][eType] > 0 ){
new
id = propPickups[lastPickup[playerid]],
Float:x,
Float:y,
Float:z;
GetPropertyEntrance( id, x, y, z );
if( IsPlayerInRangeOfPoint( playerid, 3.0, x, y, z )){
PutPlayerInProperty( playerid, id );
SendClientMessage( playerid, 0xFFFFFFFF, "INFO:You have entered a property.. type /exit to leave" );
return 1;
}
if(Masked[playerid] == 1) // If player will write /mask again his mask will be removed
{
MT[playerid] = SetTimerEx("EntWithMask", 1000, false, "i", playerid);
}
}
return 1;
}