Quote:
Originally Posted by MenaceX^
pawn Код:
if(!strcmp(cmd,"/veh",true)) { cmd=strtok(cmdtext,idx); if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /veh [vehicleid] [color 1] [color 2]"); new car=strval(cmd); if(!IsValidvehicleModel(strval(cmd))) return SendClientMessage(playerid,COLOR_GREY,"Invalid vehicle ID."); cmd=strtok(cmdtext,idx); if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /veh [vehicleid] [color 1] [color 2]"); new color1=strval(cmd); cmd=strtok(cmdtext,idx); if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_GREY,"USAGE: /veh [vehicleid] [color 1] [color 2]"); new color2=strval(cmd); GetPlayerPos(playerid,x,y,z); return CreateVehicle(car,x,y,z,0.0,color1, color2,-1); }
pawn Код:
IsValidvehicleModel(model) return model>=400&&model<611;
|
Thanks, but where to put: IsValidvehicleModel(model) return model>=400&&model<611; ?