I need some help with my command!
#1

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...
Reply
#2

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


Forum Jump:


Users browsing this thread: 1 Guest(s)