23.04.2011, 13:46
(
Последний раз редактировалось rati555; 23.04.2011 в 14:22.
)
Код:
if(strcmp(cmd, "/mask", true) == 0) { if(IsPlayerConnected(playerid)) { if(gPlayerLogged[playerid] == 0) { SendClientMessage(playerid, COLOR_GREY, " You need to login first !"); return 1; } if(PlayerInfo[playerid][pMask] == 0) { SendClientMessage(playerid, COLOR_GREY, " You dont have a mask !"); return 1; } GetPlayerName(playerid, sendername, sizeof(sendername)); GiveNameSpace(sendername); PlayerInfo[playerid][pMaskUse] = 1; format(string, sizeof(string), "* Stranger_%d puts on %s mask.",PlayerInfo[playerid][pMaskID], CheckSex(playerid)); foreach (Player,i) { ShowPlayerNameTagForPlayer(i,playerid,0); } PlayerMask[playerid] = Create3DTextLabel(PlayerNameEx(playerid),0xFFFFFFFF,0.0,0.0,0.0,8.0,GetPlayerVirtualWorld(playerid),1); Attach3DTextLabelToPlayer(PlayerMask[playerid],playerid,0.0,0.0,0.2); } else { PlayerInfo[playerid][pMaskUse] = 0; format(sendername, sizeof(sendername), "%s", PlayerNameEx(playerid)); GiveNameSpace(sendername); format(string, sizeof(string), "* %s takes off %s mask.", sendername, CheckSex(playerid)); foreach (Player,i) { ShowPlayerNameTagForPlayer(i,playerid,1); } Delete3DTextLabel(PlayerMask[playerid]); } } ProxDetector(5.0, playerid, string, COLOR_PURPLE); return 1; }