27.07.2011, 19:22
Here is my Setvip code that i personally made
So here's the problem, It doesn't work. None if the
if(PlayerInfo[playerid][pVipLevel] >= 3) work and when i type /setvip i got a response of Unknown Server Command. Whats the problem?
PHP код:
CMD:setVIP(playerid, params[])
{
new victimname[MAX_PLAYER_NAME], vipname[MAX_PLAYER_NAME], viplvl, id;
if(IsPlayerAdmin(playerid))
{
if (sscanf(params, "ui", id, viplvl)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /setvip [id] [viplevel]");
if (id == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_RED, "System: Invalid ID");
if (viplvl <= 3 && viplvl >= 0) return SendClientMessage(playerid, COLOR_RED,"System: Valid vip Levels: 1-3!");
PlayerInfo[id][pVipLevel] = viplvl;
GetPlayerName(id, victimname, sizeof(victimname));
GetPlayerName(playerid, vipname, sizeof(vipname));
new str[128];
format(str,128,"System: %s [ID %d] has set %s [ID %d] admin level to %i",vipname, playerid, victimname, id, viplvl);
SendClientMessage(playerid,COLOR_GREEN,str);
return 1;
}
else return SendClientMessage(playerid,COLOR_RED," You are not allowed to use this command!");
}
if(PlayerInfo[playerid][pVipLevel] >= 3) work and when i type /setvip i got a response of Unknown Server Command. Whats the problem?