Spawn armor with different value - 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: Spawn armor with different value (
/showthread.php?tid=425571)
Spawn armor with different value -
LeeXian99 - 26.03.2013
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";
}
Re: Spawn armor with different value - Emmet_ - 26.03.2013
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);
}
Re: Spawn armor with different value -
YesYesYes - 26.03.2013
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
Re: Spawn armor with different value -
LeeXian99 - 26.03.2013
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.
Re: Spawn armor with different value -
LeeXian99 - 26.03.2013
Well, Emmet, it doesn't work. I tested in on my server.