[HELP]Script 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP]Script skin (
/showthread.php?tid=272742)
[HELP]Script skin -
TheBluec0de - 29.07.2011
Hello everyone, I have this script that includes all the designs of the selection class, but it lacks a the id 299, how can I fix this?. Also how can I do in class selection are two animations skin?
OnGameModeInit:
Код:
for(new i = 0; i < 299; i++) if(isValidSkin(i)) AddPlayerClass(i, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
out of everything
Код:
isValidSkin(skinid)
{
switch(skinid)
{
case 3, 4, 5, 6, 8, 42, 65, 74, 86, 119, 149, 208, 268, 273, 289: return 0;
}
return 1;
}
Re: [HELP]Script skin -
Snipa - 29.07.2011
for(new i = 0; i < 300; i++) if(isValidSkin(i)) AddPlayerClass(i, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
< = less than. If it is less than 299, 298 is the greatest skin id.
Re: [HELP]Script skin -
TheBluec0de - 29.07.2011
ok then if I want him to do two animations in selecting the class of skin as I do?
Re: [HELP]Script skin -
PotH3Ad - 29.07.2011
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
new skinid = GetPlayerSkin(playerid);
switch(skinid)
{
case 299: //If the skin is 299
{
//Set the player's animation here
}
}
return 1;
}
Re: [HELP]Script skin -
Mean - 29.07.2011
pawn Код:
public OnPlayerRequestClass( playerid, classid ) {
new r = random( 2 );
switch( r ) {
case 0: ApplyAnimation( ... ); // Animation number 1.
case 1: ApplyAnimation( ... ); // Animation number 2.
}
return 1;
}
@PotH3Ad: I don't think he only wants it for skin ID 299.
Re: [HELP]Script skin -
TheBluec0de - 29.07.2011
there is a faster way?
Re: [HELP]Script skin -
TheBluec0de - 29.07.2011
that all the designs must accomplish two different animations, but only two animations for all skin
Re: [HELP]Script skin -
Mean - 29.07.2011
Switch is the fastest method I can think of...
Re: [HELP]Script skin -
TheBluec0de - 29.07.2011
but I do it for each skin?
Re: [HELP]Script skin -
TheBluec0de - 29.07.2011
some help ?