Spawn armor with different value
#1

Hello guys, I'm having problem by making this thing. The system I am using is LuxAdmin. :<

Well, I want to do this.
Regular Player = 25% of armor spawned.
Sliver = 50% of armor spawned.
Gold = 75% of armor spawned.
Premium = 100% of armor spawned.

So, how to do this with this code?
pawn Код:
if(AccInfo[playerid][pVip])
    {
        switch(AccInfo[playerid][Level])
        {
            case 1: AccType = "Sliver";
            case 2: AccType = "Gold";
            case 3: AccType = "Premium";
        }
Reply
#2

pawn Код:
if(AccInfo[playerid][pVip])
    {
        switch(AccInfo[playerid][Level])
        {
            case 1: AccType = "Sliver", SetPlayerArmour(playerid, 50);
            case 2: AccType = "Gold", SetPlayerArmour(playerid, 75);
            case 3: AccType = "Premium", SetPlayerArmour(playerid, 100);
            default: SetPlayerArmour(playerid, 25);
        }
Reply
#3

I don't know, where you are using the above written code,

add a SetPlayerArmour in front of those codes

you can set 25 , 50 , 75 and 100 armour for regular, silver, gold and premium respectively

pawn Код:
public OnPlayerSpawn(playerid)
{
        if(AccInfo[playerid][VipLevel] == 1) /*I don't know about your VIP player info, so you can set it to your own*/ return SetPlayerArmour(playerid, 25);
        if(AccInfo[playerid][VipLevel] == 2) return SetPlayerArmour(playerid, 50)
        // and so on
}
EDIT: Too late
Reply
#4

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
pawn Код:
if(AccInfo[playerid][pVip])
    {
        switch(AccInfo[playerid][Level])
        {
            case 1: AccType = "Sliver", SetPlayerArmour(playerid, 50);
            case 2: AccType = "Gold", SetPlayerArmour(playerid, 75);
            case 3: AccType = "Premium", SetPlayerArmour(playerid, 100);
            default: SetPlayerArmour(playerid, 25);
        }
Thanks, this work.
Reply
#5

Well, Emmet, it doesn't work. I tested in on my server.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)