SA-MP Forums Archive
- Skin - - 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: - Skin - (/showthread.php?tid=485446)



- Skin - - MatriXgaMer - 04.01.2014

Hello, I need help.

I want to add all skins to AllPlayerClass, is there a faster way then add like this AddPlayerClass(playerid, 1.etc)

SORRY FOR MY BAD ENGLISH!


Re: - Skin - - Konstantinos - 04.01.2014

A loop.
pawn Код:
for (new c; c != 300; ++c) if (c != 74) AddPlayerClass(c, ...);



Re: - Skin - - MatriXgaMer - 04.01.2014

Crap, i am noob in Pawn maybe you show me the full code (if you can)


Re: - Skin - - Konstantinos - 04.01.2014

You need to edit the parameters yourself, I don't know what coordinates, weapons you want.

Note that you cannot add different weapons/coordinates for each skin with that way.

pawn Код:
// OnGameModeInit:
for (new c; c != 300; ++c) if (c != 74) AddPlayerClass(c, x, y, z, Angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
Change the parameters to those you want (from x to weapon3_ammo - do not change the c).

PS: It's PAWN, pawno is the editor.


Re: - Skin - - MatriXgaMer - 04.01.2014

Thanks, [REP+]


Re: - Skin - - MatriXgaMer - 04.01.2014

pawn Код:
public OnGameModeInit()
{
    SetGameModeText("BUF Freeroam, DM, Stunts");
    for (new c; c != 300; ++c) if (c != 74) AddPlayerClass(c, 1958.3783, 1343.1572, 15.3746, 269.1425, WEAPON_AK47,  99999, WEAPON_UZI, 99999, 37, 99999);
    return 1;
}
Still not working just the CJ skin.
PS: Changed Pawno to PAWN.


Re: - Skin - - xo - 04.01.2014

pawn Код:
for (new i; i != 300; ++i)
{
AddPlayerClass(i, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
}