02.08.2014, 23:24
Write it like this
You had if (sscanf(params, "iii", vehid, colourid1, colourid2,x,y,z.
That's wrong cause' you have "iii". and because of that you need 3 params. vehid = 1, c1 = 2 & c2 = 3. x,y,z are 3 to much
Код:
CMD:createveh(playerid, params[]) { new vehid,colorid1,colorid2,Float:p[3]; if (sscanf(params, "iii", vehid, colourid1, colourid2))return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /createveh [Vehicle ID] [Coulour 1 ID] [Colour 2 ID]"); GetPlayerPos(playerid, p[0],p[1],p[2]); new v = CreateVehicle(vehid, p[0],p[1],p[2], 0, color1, color2, 1); PutPlayerInVehicle(playerid,v,1);// Puts player in the Vehicle return 1; }
That's wrong cause' you have "iii". and because of that you need 3 params. vehid = 1, c1 = 2 & c2 = 3. x,y,z are 3 to much