if vip spawn with armour. - 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: if vip spawn with armour. (
/showthread.php?tid=457065)
if vip spawn with armour. -
SwisherSweet - 08.08.2013
why does this not work every person spawns with full armour...
Код:
if(Info[playerid][Vip] < 1)
{
SetPlayerArmour(playerid, 25.0);
}
if(Info[playerid][Vip] < 2)
{
SetPlayerArmour(playerid, 50.0);
}
if(Info[playerid][Vip] < 3)
{
SetPlayerArmour(playerid, 75.0);
}
if(Info[playerid][Vip] < 4)
{
SetPlayerArmour(playerid, 100.0);
}
Re: if vip spawn with armour. -
Luis- - 08.08.2013
pawn Код:
if(Info[playerid][Vip] == 1)
{
SetPlayerArmour(playerid, 25.0);
}
if(Info[playerid][Vip] == 2)
{
SetPlayerArmour(playerid, 50.0);
}
if(Info[playerid][Vip] == 3)
{
SetPlayerArmour(playerid, 75.0);
}
if(Info[playerid][Vip] == 4)
{
SetPlayerArmour(playerid, 100.0);
}
Might work. I don't actually know what you want or how you want it.
Re: if vip spawn with armour. -
SwisherSweet - 08.08.2013
no u don't understand a original player spawns with armour aswell...
Re: if vip spawn with armour. -
Luis- - 08.08.2013
pawn Код:
if(Info[playerid][Vip] == 1)
{
SetPlayerArmour(playerid, 25.0);
}
else if(Info[playerid][Vip] == 2)
{
SetPlayerArmour(playerid, 50.0);
}
else if(Info[playerid][Vip] == 3)
{
SetPlayerArmour(playerid, 75.0);
}
else if(Info[playerid][Vip] == 4)
{
SetPlayerArmour(playerid, 100.0);
}
Try this then!
Re: if vip spawn with armour. -
-Shifty- - 08.08.2013
pawn Код:
public OnPlayerSpawn (PlayerID)
{
if(Info[playerid][Vip] == 1) { SetPlayerArmour(playerid, 25.0); }
if(Info[playerid][Vip] == 2) { SetPlayerArmour(playerid, 50.0); }
if(Info[playerid][Vip] == 3) { SetPlayerArmour(playerid, 75.0); }
if(Info[playerid][Vip] == 4) { SetPlayerArmour(playerid, 100.0); }
return 1;
}
Does this works?
Re: if vip spawn with armour. -
Luis- - 08.08.2013
Quote:
Originally Posted by -Shifty-
pawn Код:
public OnPlayerSpawn (PlayerID) { if(Info[playerid][Vip] == 1) { SetPlayerArmour(playerid, 25.0); } if(Info[playerid][Vip] == 2) { SetPlayerArmour(playerid, 50.0); } if(Info[playerid][Vip] == 3) { SetPlayerArmour(playerid, 75.0); } if(Info[playerid][Vip] == 4) { SetPlayerArmour(playerid, 100.0); }
return 1; }
Does this works?
|
That's just the same code I posted, I am sure he's using OnPlayerSpawn.