06.02.2011, 08:20
Please help my command sets id 0 only regardless of what id i state, Ive tried everything.
pawn Код:
CMD:setvip(playerid, params[])
{
new vip,id,file[256],str[128],name[MAX_PLAYER_NAME];
GetPlayerName(id,name,MAX_PLAYER_NAME);
format(file,sizeof(file),"Admin/Accounts/%s.txt",name);
if(pInfo[playerid][Level] < 5) return SendClientMessage(playerid,RED,">> Your Not A High Enough Level To Use This Command!");
if(sscanf(params, "Ui", id, vip)) return SendClientMessage(playerid,RED,"USAGE: /setvip [id] [level]");
if(!IsPlayerConnected(id))return SendClientMessage(playerid,RED,">> Player Not Found!");
pInfo[id][VIP] = vip;
dini_IntSet(file,"VIP",vip);
format(str,sizeof(str),">> You Have Set %s's VIP Level To %d!",name,vip);
SendClientMessage(playerid,YELLOW,str);
GameTextForPlayer(id,"~g~Promotion!",3000,5);
return true;
}