13.05.2012, 10:33
Hello. I make my VIP FS. But when I type /rcon login and /setvip for another player, it happends nothing.
Help pls..... +rep
pawn Код:
dcmd_setvip(playerid, params[])
{
new id,vip;
if(!IsPlayerAdmin(playerid))return SendClientMessage(playerid,red,"ERROR: Nisi Admin da bi koristili ovu Komandu.");
if(sscanf(params,"ui", id,vip))return SendClientMessage(playerid, red, "KORISTI: /setvip [id] [VipID]");//VIP 1= Premium 2=Silver 3=GOLD
if(vip > 3)return SendClientMessage(playerid,red,"ERROR: Imaju samo 3 VIP Level-a.");
if(vip == 1)
{
GetPlayerName(playerid, Name, sizeof(Name));
format(String, sizeof(String), "INFO: Administrator %s vam je stavio Premium VIP Level.",Name);
SendClientMessage(id,green, String);
if(!dini_Exists(PFile(playerid)))
{
dini_Create(PFile(playerid));
dini_IntSet(PFile(playerid),"VipMember",1);
}
else if(dini_Exists(PFile(playerid)))
{
dini_IntSet(PFile(playerid),"VipMember",1);
}
GivePlayerMoney(playerid, 500000);
}
if(vip == 2)
{
GetPlayerName(playerid, Name, sizeof(Name));
format(String, sizeof(String), "INFO: Administrator %s vam je stavio Silver VIP Level.",Name);
SendClientMessage(id,green, String);
if(!dini_Exists(PFile(playerid)))
{
dini_Create(PFile(playerid));
dini_IntSet(PFile(playerid),"VipMember",2);
}
else if(dini_Exists(PFile(playerid)))
{
dini_IntSet(PFile(playerid),"VipMember",2);
}
GivePlayerMoney(playerid, 1000000);
}
if(vip == 3)
{
GetPlayerName(playerid, Name, sizeof(Name));
format(String, sizeof(String), "INFO: Administrator %s vam je stavio Gold VIP Level.",Name);
SendClientMessage(id,green, String);
if(!dini_Exists(PFile(playerid)))
{
dini_Create(PFile(playerid));
dini_IntSet(PFile(playerid),"VipMember",3);
}
else if(dini_Exists(PFile(playerid)))
{
dini_IntSet(PFile(playerid),"VipMember",3);
}
GivePlayerMoney(playerid, 2000000);
}
return 1;
}