Class skin help
#1

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);
}
Reply
#2

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)