12.04.2012, 20:16
Ae Agora sу tem 1 problema , o nome do player nao some de cima dele ... pq ?
Comandos :
Comandos :
pawn Код:
if(strcmp(cmdtext, "/colocarmascara", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new sendername[MAX_PLAYER_NAME];
new string[256];
if(PlayerInfo[playerid][pMask] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo tem uma mascara");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, false);
}
}
PlayerInfo[playerid][pMaskuse] = 1;
SendClientMessage(playerid, COLOR_WHITE, "Vocк colocou sua mascara! [/tirarmascara - para tirar].");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s colocou sua mascara.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
SetPlayerAttachedObject(playerid, 1, 19036, 2, 0.107, 0.020, 0.0, 90, 90, 0);
}
return 1;
}
if(strcmp(cmdtext, "/tirarmascara", true) == 0)
{
if(IsPlayerConnected(playerid))
{
new sendername[MAX_PLAYER_NAME];
new string[256];
if(PlayerInfo[playerid][pMaskuse] == 0)
{
SendClientMessage(playerid, COLOR_GRAD1, "Vocк nгo estб usando uma mascara");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, true);
}
}
PlayerInfo[playerid][pMaskuse] = 0;
SendClientMessage(playerid, COLOR_WHITE, "Vocк tirou sua mascara [/colocarmascara - para usar].");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s tirou sua mascara.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
for(new i=0; i<MAX_PLAYER_ATTACHED_OBJECTS; i++)
{
if(IsPlayerAttachedObjectSlotUsed(playerid, i)) RemovePlayerAttachedObject(playerid, i);
}
}
return 1;
}