Setlevel command working just for me
#1

If i setvlevel to myself, it is showing correct, if i setvlevel to someone that is not me, it's showing,VIP level set to 0.....


Код:
CMD:setvlevel(playerid, params[])
{
	if(!IsPlayerAdmin(playerid)) return SCM(playerid,COLOR_ERROR,"Error: You must be logged in as RCON!");
	new string[128], userid;
	if(sscanf(params, "ui", userid, PlayerInfo[userid][pVIP])) return SCM(playerid,COLOR_GREY,"Usage: /setvlevel [UserID] [Level]");
	if(userid == INVALID_PLAYER_ID) return SCM(playerid,COLOR_ERROR,"Error: Player is not connected!");
	format(string, sizeof(string), "Admin %s has set your VIP LEVEL to %i", GetName(playerid), PlayerInfo[userid][pVIP]);
	SCM(userid,COLOR_ORANGERED,string);
	format(string, sizeof(string), "You've set %s VIP LEVEL to %i", GetName(userid), PlayerInfo[userid][pVIP]);
	SCM(playerid,COLOR_ORANGERED,string);
	PlayerPlaySound(playerid,1137,0.0,0.0,0.0);
	PlayerPlaySound(userid,1137,0.0,0.0,0.0);
	return 1;
}
Reply
#2

Код:
new level;
if (sscanf(params, "ud", userid, level))

PlayerInfo[userid][pVIP] = level;
Reply
#3

I'm gonna try it, but it's not the same?
Reply
#4

Quote:
Originally Posted by Fabyx15
Посмотреть сообщение
I'm gonna try it, but it's not the same?
No, it's completely different.
Reply
#5

Now i'm setting the vip level correct, but when i do /stats or i try some commands that needs vip, it says i have / or someone has vip level 0....
Reply
#6

Solved by putting PlayerInfo[userid][pVIP] = level; under sscanf
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)