15.10.2010, 16:26
Is there a way like onplayercommand 'example" setcar?
so that when they teleport there they automaticly get that car
so that when they teleport there they automaticly get that car
new vehid = GetPlayerVehicleID(playerid); SetVehiclePos(vehid, x, y, z); SetPlayerPos(playerid, x, y, z); PutPlayerInVehicle(playerid, vehid, 0);
Код:
new vehid = GetPlayerVehicleID(playerid); SetVehiclePos(vehid, x, y, z); SetPlayerPos(playerid, x, y, z); PutPlayerInVehicle(playerid, vehid, 0); |
new Float:x, Float:y, Float:z, Float:angle; if (IsPlayerInAnyVehicle(playerid)) GetVehiclePos(GetPlayerVehicleID(playerid), x, y, z); else GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, angle); //teleport player here new vid = CreateVehicle(id of the car you want to spawn, x, y, z, angle, -1, -1, 180); LinkVehicleToInterior(vid, GetPlayerInterior(playerid)); SetVehicleVirtualWorld(vid, GetPlayerVirtualWorld(playerid)); GameTextForPlayer(playerid, "~g~Vehicle spawned!", 2000, 4); PutPlayerInVehicle(playerid, vid, 0);