23.02.2013, 09:08
hai, this is my commanad
But when i type /setvip. it no worx! xD So would you tell me how to fix this?
pawn Код:
CMD:setvip(playerid, params[])
{
if(IsPlayerAdmin(playerid))
{
new string[125], level, player1;
if(!strlen(params)) return
SendClientMessage(playerid, RED, "Usage: /setvip [PlayerID] [AccountType (0-3)]");
if(!IsPlayerConnected(playerid) && player1 != INVALID_PLAYER_ID)
{
SendClientMessage(playerid, RED,"[ERROR]: Player is not connected");
}
if(level > MAX_VIPL)
{
SendClientMessage(playerid, RED,"[ERROR]: Incorrect level");
}
else
{
format(string, sizeof(string),""cblue"Administrator "cgreen"'%s' "cblue"has set your vip level to "cgreen"'%d'", PlayerName(playerid),level);
SendClientMessage(player1, PURPLE, string);
PlayerPlaySound(player1,1057,0.0,0.0,0.0);
PlayerInfo[player1][pVIP] = level;
}
}
else return SendClientMessage(playerid, RED,"[ERROR]: You need to be RCON admin to use this command");
return 1;
}