SA-MP Forums Archive
I need some help with my command! - 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: I need some help with my command! (/showthread.php?tid=87830)



I need some help with my command! - SEC - 22.07.2009

Hey guyz,
i want to do a command : /wheel [1-16(id of the wheel)]
This is my code: (read carefully the code...everything is explained)
Код:
new felgen[] = {1025,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,
1083,1084,1085,1096,1097,1098}; //these are the wheel ids


new antifelgen[] = {
472,
473,
493,
595,
484,
430,
453,
452,
446,
454,
537,
538,
449,
569,
590,
576,
};//these are the ids of the vehicles which would crash with wheels

if (strcmp("/wheel", cmd, true) == 0)
{
tmp = strtok(cmdtext, idx);
if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "[ERROR]USAGE: /wheel [1-16]"); //checking if he writes anything behind /wheel
//....here I need help: i want to check if the player is not in any of the "antifelgen"(the vehicles that crash) and if he is typing a right wheel id
//.... 
AddVehicleComponent(GetPlayerVehicleID(playerid),felgen[strval(tmp)]);//and this would add the wheel
return 1;
}
I hope you can help me...


Re: I need some help with my command! - KIDUL - 22.07.2009

people donґt forget this (i canґt help)