Class skin help - 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: Class skin help (
/showthread.php?tid=507577)
Class skin help -
gotwarzone - 18.04.2014
I have this code under Onplayerspawn. But what I need in this class is I want 3 skins to randomly choose. Like when I choose civilian class it will randomly choose from skin id (3,43,12)
Код:
if(Class[playerid]==1)
{
GameTextForPlayer(playerid, "~w~Class: ~g~CIVILIAN", 3000, 3);
SetPlayerHealth(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 25, 100);
GivePlayerWeapon(playerid, 17, 5);
GivePlayerWeapon(playerid, 8, 1);
}
Re: Class skin help -
ChandraLouis - 18.04.2014
Try this
pawn Код:
new Skins[] = {3,43,12};
if(Class[playerid]==1)
{
GameTextForPlayer(playerid, "~w~Class: ~g~CIVILIAN", 3000, 3);
SetPlayerHealth(playerid, 100);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 31, 500);
GivePlayerWeapon(playerid, 25, 100);
GivePlayerWeapon(playerid, 17, 5);
GivePlayerWeapon(playerid, 8, 1);
new randSkin = random(sizeof(Skins));
SetPlayerSkin(playerid, Skins[randSkin]);
}
Next time use pawn