Code:
Watever(playerid)
{
new var = GetPlayerSkin(playerid);
switch(var)
{
case 0:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,18639,2,0.04,-0.05,-0.00,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,1409,1,-0.90,-0.00,-0.04,0.0,87.0,1.0,0.66,0.73,1.19);
SetPlayerAttachedObject(playerid,2,18648,2,-0.11,0.10,-0.00,0.0,83.0,248.0,1.00,1.00,1.00);
}
case 20:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,1588,2,-0.57,0.01,-0.06,0.0,83.0,0.0,0.62,0.61,0.80);
SetPlayerAttachedObject(playerid,1,18699,1,0.47,-0.08,-2.21,0.0,0.0,0.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,2,18641,1,0.31,0.01,-0.17,0.0,98.0,10.0,0.66,1.00,1.00);
SetPlayerAttachedObject(playerid,3,18641,2,-0.12,-0.01,0.17,0.0,73.0,10.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,4,18699,2,0.04,0.00,-1.34,0.0,0.0,0.0,1.00,1.00,1.00);
}
case 93:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,18693,1,-0.38,0.06,-1.54,0.0,0.0,0.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,1,18693,1,-0.42,0.02,1.39,0.0,177.0,0.0,1.00,1.00,1.00);
}
case 192:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,18718,2,-0.03,0.00,-1.49,0.0,0.0,0.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,1,18718,2,-0.86,-0.07,1.30,0.0,870.0,549.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,2,18688,1,-0.36,-0.24,-1.66,0.0,0.0,0.0,1.00,1.00,1.00);
}
case 248:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,1114,2,-0.23,0.01,-0.12,110.0,7.0,40.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,1,1114,2,-0.18,-0.08,0.13,250.0,-1.0,31.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,2,1114,1,-0.36,0.05,0.08,270.0,-10.0,-29.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,3,1114,1,-0.36,0.06,-0.21,450.0,184.0,391.0,1.00,1.00,1.00);
}
case 299:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,18728,2,-1.59,0.00,-0.91,0.0,778.0,0.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,1,19141,2,0.03,0.02,0.01,0.0,0.0,0.0,2.46,1.20,1.00);
}
case 68:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,19163,2,0.03,0.03,0.00,-748.0,83.0,-147.0,1.29,1.30,1.50);
SetPlayerAttachedObject(playerid,1,19142,1,-0.01,0.03,0.00,0.0,0.0,0.0,1.38,1.13,1.00);
SetPlayerAttachedObject(playerid,2,18688,2,0.00,-0.17,-1.53,0.0,0.0,0.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,3,41,1,0.00,0.00,0.00,0.0,0.0,0.0,1.00,1.00,1.00);
}
case 241:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,19159,2,0.57,-0.00,0.05,0.0,82.0,-1.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,1,19091,2,-0.11,0.00,0.03,8.0,-9.0,0.0,1.00,1.00,1.00);
}
case 294:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,18965,2,0.01,-0.02,-0.29,0.0,46.0,0.0,1.77,1.00,1.00);
SetPlayerAttachedObject(playerid,1,18965,2,-0.02,0.00,0.26,0.0,-28.0,5.0,1.95,1.04,1.00);
SetPlayerAttachedObject(playerid,2,19142,1,0.02,0.02,0.01,0.0,0.0,0.0,1.32,1.20,1.00);
SetPlayerAttachedObject(playerid,4,19163,2,0.04,0.03,0.00,0.0,88.0,179.0,1.58,1.32,1.75);
}
//-------------------------END OF ALIEN SKINS-------------------------//
case 23:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,18641,7,0.18,0.03,-0.10,0.0,-82.0,6.0,1.49,1.52,1.53);
}
case 73:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,19006,2,0.09,0.03,0.00,0.0,85.0,90.0,1.00,1.00,1.00);
SetPlayerAttachedObject(playerid,1,19142,1,0.04,0.05,-0.01,0.0,0.0,-2.0,1.04,1.11,1.01);
}
case 126:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,18961,2,0.12,0.01,-0.00,0.0,86.0,100.0,1.07,1.07,0.89);
}
case 247:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,18961,2,0.12,0.01,0.01,0.0,86.0,100.0,1.12,1.18,0.89);
SetPlayerAttachedObject(playerid,1,19026,2,0.10,0.00,0.00,0.0,89.0,94.0,1.63,1.16,1.00);
}
case 283:
{
SetPlayerAttachedObject(playerid,0,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,1,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,2,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,3,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,4,0,0,0,0,-0,0.0,0.0,0.0,2.75,1.35,1.00);
SetPlayerAttachedObject(playerid,0,19027,1,0.48,0.06,0.00,0.0,94.0,83.0,1.00,1.00,1.00);
}
}
return 1;
}
When this function is executed under OnPlayerRequestClass or OnPlayerSpawn, The game crashes giving "encountered some problem blabla", This not my code or client problem
Tested on blank script, Confirmed its not a script bug, Please anyone else confirm it
This code can't possibly work. You are attaching more than 5 objects and use this same index for multiple objects.