05.04.2014, 11:34
Hey, got a problem, I got a /veh command but I need to fill in the vehicle id, I cannot put in the vehicle's name, how to fix that?
For example:
/veh 560 0 0
I want:
/veh sultan 0 0
Thanks!
For example:
/veh 560 0 0
I want:
/veh sultan 0 0
Код:
YCMD:veh(playerid, params[], help) { if(help) return SCM(playerid, COLOR_GREY, "Not supported"); if(PlayerInfo[playerid][pAdmin] >= 3) { new model, iColor[2], vid, Float:x, Float:y, Float:z, Float:angle; new engine,lights,alarm,doors,bonnet,boot,objective; if(sscanf(params,"dii",model, iColor[0],iColor[1])) return SCM(playerid, COLOR_GRAD, "USAGE: /veh [model id] [color1] [color2]"); if(model < 400 || model > 611) return SCM(playerid, COLOR_GREY, "[DEBUG]: Vehicle ID's must be between 400 - 611."); if(iColor[1] < 0 && iColor[1] > 126) { SCM(playerid, COLOR_GREY, "Invalid color ID."); } GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); vid = CreateVehicle(model, x, y, z, angle, iColor[0], iColor[1], -1); GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective); SetVehicleParamsEx(vid, 1, lights, alarm, doors, bonnet, boot, objective); engineOn[vid] = true; SetVehicleNumberPlate(vid, "ADMIN"); PutPlayerInVehicle(playerid, vid, 0); } return 1; }