26.02.2013, 06:41
Hey, when i use /mask the server just stops responding, but i still see it running, i just cant connect.. can you please help me finding out whats wrong with this command?
Код:
if(strcmp(cmd,"/mask",true) == 0)
{
if(PlayerInfo[playerid][pLevel] >= 5)
{
if(PlayerInfo[playerid][pMask] == 1)
{
if(MaskOn[playerid] == 0)
{
new string[256];
MaskOn[playerid] = 1;
new rand = 1000 + random(8999);
MaskNumber[playerid] = rand;
format(string, sizeof(string), "* %s takes out a mask and places it over their head. *", MaskOnOff(playerid));
ProxDetector(30.0, playerid, string, COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED,COLOR_RED);
format(string, sizeof(string), "Stranger_%d", MaskNumber[playerid]);
masklabel[playerid] = Create3DTextLabel(string, COLOR_WHITE, 30.0, 40.0, 50.0, 8.0, 0);
Attach3DTextLabelToPlayer(masklabel[playerid], playerid, 0.0,0.0,0.2);
for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(i, playerid, false);
}
else return SendClientMessage(playerid, COLOR_WHITE, "You already have your mask on.");
}
else return SendClientMessage(playerid, COLOR_WHITE, "You don't have a Mask.");
}
else return SendClientMessage(playerid, COLOR_WHITE, "You must be level 5 and above to use a mask.");
return 1;
}

