12.10.2014, 10:49
Try using sscanf:
Код:
CMD:veh(playerid, params[]) { new modelid; if(sscanf(params, "i", modelid)) return SendClientMessage(playerid, red, "Error. Usage: /veh [modelid]"); if(modelid > 611 || modelid < 400) return SendClientMessage(playerid, red, "Error. Models are between 400 and 611."); new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); new playervehicle = CreateVehicle(modelid, x, y, z, 0.0, -1, -1, -1); PutPlayerInVehicle(playerid, playervehicle, 0); return 1; }