06.02.2011, 09:48
Okay, I edited it a little to try it out on my system and command worked.
pawn Код:
COMMAND:setvip(playerid, params[])
{
new level,id,file[128],str[128],name[MAX_PLAYER_NAME];
GetPlayerName(id,name,sizeof(name));
format(file,sizeof(file),"Admin/Accounts/%s.txt",name);
if(!sscanf(params, "ui",id,level))
{
if(pInfo[playerid][Level] >= 5)
{
if(IsPlayerConnected(id))
{
pInfo[id][VIP] = level;
dini_IntSet(file,"VIP",level);
format(str,sizeof(str),"You Have Set %s's VIP Level To %d!",name,level);
SendClientMessage(playerid,YELLOW,str);
GameTextForPlayer(id,"~g~Promotion!",3000,5);
}
else return SendClientMessage(playerid,RED,"Player Not Found!");
}
else return SendClientMessage(playerid,RED,"Your Not A High Enough Level To Use This Command!");
}
else return SendClientMessage(playerid,RED,"USAGE: /setvip [id] [level]");
return 1;
}