18.12.2014, 15:43
I got this /vips command where the player can check the vips but for some reason, when the list shows up, it shows that everyone has vip level 3 (which is the maximum level) even tho I gave them only level 1 or 2. What's the problem ? Here is the command :
I don't really know what can be done because I am not getting any errors when compiling the script.
PHP код:
CMD:vips(playerid, params[]) {
new count = 0;
new string[256];
new name[MAX_PLAYER_NAME];
SendClientMessage(playerid, GREEN," ");
SendClientMessage(playerid, GREEN,"Currently online very important players (vips)");
for(new i = 0; i < MAX_PLAYERS; i ++) {
if(IsPlayerConnected(i)) {
GetPlayerName(i, name, sizeof(name));
if(PlayerInfo[i][pVIP] >= 1) {
format(string, sizeof(string),"Donator Level - %d: %s ", PlayerInfo[playerid][pVIP],name);
SendClientMessage(playerid, PURPLE, string);
count++;
}
}
}
if(count == 0) {
SendClientMessage(playerid, GREEN,"No vips online right now");
}
return 1;
}