07.08.2018, 21:58
(
Последний раз редактировалось S3DOx; 07.08.2018 в 21:59.
Причина: wrong type
)
Hello,
i made a system thats spawn a drone (rc vehicle) but i have got a problem in exit the drone as we know you can't exit from it but i have made this :
and the problem was i just got eject from the vehicle without go back to the first location when i used this cmd
i made a system thats spawn a drone (rc vehicle) but i have got a problem in exit the drone as we know you can't exit from it but i have made this :
Quote:
public OnPlayerCommandText(playerid, cmdtext[]) { new vehicleid; if (strcmp("/drone", cmdtext, true, 10) == 0) { new Float:fx, Float:fy, Float:fz, Float:fa; new Float: x, Float:y, Float:z, Float:a; GetPlayerPos(playerid, fx, fy, fz); GetPlayerFacingAngle(playerid, fa); if(IsPlayerInAnyVehicle(playerid)) { vehicleid = GetPlayerVehicleID(playerid); SetPlayerPos(playerid, fx, fy, fz); SetPlayerFacingAngle(playerid, fa); SendClientMessage(playerid, -1, "Drone Status:{6a0001}Off "); SetPlayerInterior(playerid, 0); return 1; } else { GetPlayerPos(playerid, x, y, z); GetPlayerFacingAngle(playerid, a); vehicleid = AddStaticVehicleEx(465, x, y, z, a, -1, -1, -1); LinkVehicleToInterior(vehicleid, 1); SendClientMessage(playerid, -1, "Drone Status:{0b6a00}On "); PutPlayerInVehicle(playerid, vehicleid, 0); } } return 0; } |