30.11.2009, 18:36
The problem is that I want it to only be possible for donaters to use this command: /dmask. But as it is like now, it's possible for everyone.
Basically I just need help with modifying this command to only work for donators:
I've tried now for an hour or more, without any success. Thank you.
Basically I just need help with modifying this command to only work for donators:
pawn Код:
if(strcmp(cmd, "/dmask", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMask] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "[Error:] You do not have a mask");
return 1;
}
if(PlayerInfo[playerid][pLevel] < 5)
{
SendClientMessage(playerid, COLOR_GREY, "[Error:] You are not at the required level to use this command");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
ShowPlayerNameTagForPlayer(i, playerid, 0);
}
}
PlayerInfo[playerid][pMaskuse] = 1;
SendClientMessage(playerid, COLOR_WHITE, "[Info:] You have put your mask on");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s puts a mask on", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
return 1;
}