SA-MP Forums Archive
Give armour To Only V.I.P'S - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Give armour To Only V.I.P'S (/showthread.php?tid=410522)



Give armour To Only V.I.P'S - California_ - 25.01.2013

Hi I just made a VIP System I want only V.I.P's To have armour.

Not the players. This is the thingy were You ask the script is the player a VIP



pawn Код:
if(dini_Int(PFile(playerid),"VipMember")<1)


So Im Just asking is it going to Work. Here's the code:

pawn Код:
public OnPlayerSpawn(playerid)
{
if(dini_Int(PFile(playerid),"VipMember")<1)
SetPlayerArmour(playerid,100);

return 1;
}



Re: Give armour To Only V.I.P'S - Roach_ - 25.01.2013

Yes, it will work
Well if the Save System is not working, it will not..


Re: Give armour To Only V.I.P'S - Neil. - 25.01.2013

Enums are somewhat better.
for example:
pawn Код:
enum pInfo
{
Vip
}
new PlayerInfo[MAX_PLAYERS][pInfo];

CMD:givemearmour(playerid, params[])
{
    if(PlayerInfo[playerid][Vip] >= 1)
    {
        SetPlayerArmour(playerid, 100);
    }
return 1;
}
Ofcourse, you should save it too. But i'm not going that deep to tell you now.