05.01.2013, 14:51
You forgot the last bracket! You open 7 and close just 6.
Here you are.
Here you are.
pawn Код:
CMD:mask(playerid, params[])
{
new randomID = random(200);
new string[35];
if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
if(PlayerInfo[playerid][pMasked] == 0;)
{
PlayerInfo[playerid][pMasked] = 1;
SetPlayerAttachedObject(playerid, 9, 19037, 2, 10, 4.7, 0.0, 90, 90, 0);//You can change this however you want, use sa-mp wiki for more info, right now is HockeyMask2
SendClientMessage(playerid, COLOR_WHITE, "You have put on a mask! (/mask to romove it)");
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 0); // ShowPlayerNameTagForPlayer(i, playerid, 0) hide name for all players
}
}
else
{
PlayerInfo[playerid][pMasked] = 0;
SendClientMessage(playerid, COLOR_WHITE, "You have removed your mask!"); // This is message what was send when you remove your mask
if(IsPlayerAttachedObjectSlotUsed(playerid, 9))
{
RemovePlayerAttachedObject(playerid, 9);
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, playerid, 1); // ShowPlayerNameTagForPlayer(i, playerid, 1) show name back.
}
}
return 1;
}
}
}