16.05.2012, 16:18
hello does anyone know how to code a mask command for the hitman faction?
/mask on
/mask off
would be great!
/mask on
/mask off
would be great!
new masked[playerid];
if(strcmp(cmd, "/mask", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(masked[playerid])
{
for(new i = 0; i < MAX_ONLINE_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
masked[playerid] = true;
GameTextForPlayer(playerid, "~r~Masked", 1000, 4);
}
else
{
for(new i = 0; i < MAX_ONLINE_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 1);
}
}
masked[playerid] = false;
GameTextForPlayer(playerid, "~g~Unmasked", 1000, 4);
}
}
return 1;
}
public OnPlayerStreamIn(playerid, forplayerid) { if(UsingMask[playerid] == 1) { ShowPlayerNameTagForPlayer(playerid, forplayerid, 0); } return 1; }