SA-MP Forums Archive
What is wrong ? - 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: What is wrong ? (/showthread.php?tid=294063)



What is wrong ? - TheBluec0de - 31.10.2011

What is wrong ? i added new skin 0.3d.. but dosent work..

OnGameModeInit

Код:
for(new i = 0; i < 313; i++) if(isValidSkin(i)) AddPlayerClass(i, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
out of everything

Код:
isValidSkin(skinid)
{
   switch(skinid)
   {
      case 74, 268: return 0;
   }
   return 1;
}



Re: What is wrong ? - Stigg - 31.10.2011

What do mean it dont work ?
Can we see some code ?


Re: What is wrong ? - Stigg - 31.10.2011

Quote:
Originally Posted by TheBluec0de
Посмотреть сообщение
What is wrong ? i added new skin 0.3d.. but dosent work..

OnGameModeInit

Код:
for(new i = 0; i < 313; i++) if(isValidSkin(i)) AddPlayerClass(i, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
out of everything

Код:
isValidSkin(skinid)
{
   switch(skinid)
   {
      case 74, 268: return 0;
   }
   return 1;
}
For all skins use:
pawn Код:
public OnGameModeInit()
{
    for(new i = 0; i < 299; i++)
    {
        AddPlayerClass(i,0.0,0.0,0.0,0.0,-1,-1,-1,-1,-1,-1);//all skins
    }
    return 1;
}
https://sampwiki.blast.hk/wiki/Skins


Re: What is wrong ? - TheBluec0de - 31.10.2011

crashes if I choose the skin,

EDIT: yes, but so are all the skin, also id invalid


Re: What is wrong ? - Stigg - 31.10.2011

You dont need:
pawn Код:
isValidSkin(skinid)
{
   switch(skinid)
   {
      case 74, 268: return 0;
   }
   return 1;
}
Just try it the way i posted, works for me.


Re: What is wrong ? - TheBluec0de - 31.10.2011

Код:
isValidSkin(skinid)
is invalid skin ID


Re: What is wrong ? - TheBluec0de - 31.10.2011

Solved...