28.08.2015, 17:32
Quote:
Try this way:
Код:
CMD:veh(playerid, params[]) { new car, Float:CarPos[3], string[32]; if(sscanf(params,"d", car)) return SendClientMessage(playerid,0xff0000ff,"USAGE: /Veh <Vehicle ID 400 - 611>"); if(car < 400 || car > 611) return SendClientMessage(playerid, 0xff0000ff, "ERROR: Cannot go under 400 or above 611."); if(GetPlayerInterior(playerid) != 0) return 1; GetPlayerPos(playerid, CarPos[0], CarPos[1], CarPos[2]); DestroyVehicle(Vehicle[playerid]); Vehicle[playerid] = CreateVehicle(car, CarPos[0], CarPos[1], CarPos[2] + 2.0, 0, -1, -1, 1); SetVehicleVirtualWorld(Vehicle[playerid], GetPlayerVirtualWorld(playerid)); PutPlayerInVehicle(playerid, Vehicle[playerid], 0); format(string,sizeof(string),"You Have Spawned Vehicle ID %i",car); SendClientMessage(playerid, 0xffffffff, string); return 1; } |