04.11.2011, 07:00
Okay guys, this is my problem.
1. i connect on server and i am ID 0 and i do stuff to myself such as set my level to for example ten. My friend joins and i set his level to ten, but it changes mine still...
2. So i logged in as ID 1 now, and this time myfriend is 0, i change his stats but cant change mine, what might be the problem?
1. i connect on server and i am ID 0 and i do stuff to myself such as set my level to for example ten. My friend joins and i set his level to ten, but it changes mine still...
2. So i logged in as ID 1 now, and this time myfriend is 0, i change his stats but cant change mine, what might be the problem?
Код:
CMD:setlevel(playerid, params[]) { new id; new ammount; if(PVar[playerid][pLevel] >= 10) { if(!sscanf(params, "ui", id, ammount)) { new string[64]; new name[MAX_PLAYER_NAME], PlayerName[MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); GetPlayerName(id, PlayerName, sizeof(PlayerName)); format(string, sizeof(string), "%s made you level %d administrator.", name, ammount); SendClientMessage(id, COLOR_GREEN, string); format(string, sizeof(string), "You've made %s level %d administrator.", PlayerName, ammount); SendClientMessage(playerid, COLOR_GREEN, string); PVar[id][pLevel] = ammount; return 1; } else return SendClientMessage(playerid, COLOR_RED, "(Usage) /setlevel (ID) (Ammount)"); } else return SendClientMessage(playerid, COLOR_RED, "(Server) You are not an administrator."); }