28.07.2010, 21:46
Код:
if(!strcmp(cmdtext, "/teles", true)) { ShowPlayerDialog(playerid, 100, DIALOG_STYLE_LIST, "Teles:","Wheel Arch Angels\nTransfender\nLV Drift Place\nLas Venturas","Tele","Cancel"); return 1; }
Код:
public OnDialogResponse(playerid, dialogid, response, listitem) { if(dialogid == TELES) { if(response) { if(listitem == 0) // WHEEL ARCH ANGELS { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),-2701.4585,217.5867,3.8385); SetVehicleZAngle(GetPlayerVehicleID(playerid), 91.2956); LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0); } else { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid,-2701.4585,217.5867,3.8385); SetPlayerFacingAngle(playerid, 91.2956); SetCameraBehindPlayer(playerid); } } if(listitem == 1) // TRANSFENDER { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),-1935.6522,228.0252,33.8146); SetVehicleZAngle(GetPlayerVehicleID(playerid), 1.5406); LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0); } else { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid,-1935.6522,228.0252,33.8146); SetPlayerFacingAngle(playerid, 1.5406); SetCameraBehindPlayer(playerid); } if(listitem == 2) // LS DRIFT PLACE { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),-353.9413,1530.6729,75.0178); SetVehicleZAngle(GetPlayerVehicleID(playerid), 261.2167); LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0); } else { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid,-322.3323,1534.3572,75.3594); SetPlayerFacingAngle(playerid, 212.9927); SetCameraBehindPlayer(playerid); } if(listitem == 3) // LAS VENTURAS { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(GetPlayerVehicleID(playerid),2173.6948,1680.2266,10.5474); SetVehicleZAngle(GetPlayerVehicleID(playerid), 85.7950); LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0); } else { RemovePlayerFromVehicle(playerid); SetPlayerPos(playerid,2187.9893,1668.9257,11.1105); SetPlayerFacingAngle(playerid, 55.3078); SetCameraBehindPlayer(playerid); } return 1; } } } } } return 1; }