24.08.2010, 18:21
Code:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { new pname[MAX_PLAYER_NAME]; new string[256]; if(dialogid == TPD) { if(response) { if(listitem == 0) // TPD 1 { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) if(IsPlayerInAnyVehicle(playerid)) { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SetVehiclePos(VehicleID,-2418.4846,-614.8561,132.2391); SetVehicleZAngle(GetPlayerVehicleID(playerid), 35.9913); GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD1 ( /tpd1 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); } else { GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD1 ( /tpd1 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); SetPlayerPos(playerid,-2418.4846,-614.8561,132.2391); SetPlayerFacingAngle(playerid, 35.9913); ResetPlayerWeapons(playerid); } } if(listitem == 1) // TPD 2 { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) if(IsPlayerInAnyVehicle(playerid)) { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SetVehiclePos(VehicleID,-302.7378,1532.6254,75.0172); SetVehicleZAngle(GetPlayerVehicleID(playerid), 181.0729); GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD2 ( /tpd2 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); } else { GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD2 ( /tpd2 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); SetPlayerPos(playerid,-302.7378,1532.6254,75.0172); SetPlayerFacingAngle(playerid, 181.0729); ResetPlayerWeapons(playerid); } } if(listitem == 2) // TPD 3 { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) if(IsPlayerInAnyVehicle(playerid)) { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SetVehiclePos(VehicleID,1260.8165,-2055.7664,59.0758); SetVehicleZAngle(GetPlayerVehicleID(playerid), 267.3261); GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD2 ( /tpd2 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); } else { GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD2 ( /tpd2 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); SetPlayerPos(playerid,1260.8165,-2055.7664,59.0758); SetPlayerFacingAngle(playerid, 267.3261); ResetPlayerWeapons(playerid); } } if(listitem == 3) // TPD 4 { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) if(IsPlayerInAnyVehicle(playerid)) { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SetVehiclePos(VehicleID,2325.9778,1404.4043,42.4779); SetVehicleZAngle(GetPlayerVehicleID(playerid), 1.6687); GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD2 ( /tpd2 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); } else { GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD2 ( /tpd2 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2325.9778,1404.4043,42.4779); SetPlayerFacingAngle(playerid, 1.6687); ResetPlayerWeapons(playerid); } } if(listitem == 4) // TPD 5 { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) if(IsPlayerInAnyVehicle(playerid)) { new VehicleID; VehicleID = GetPlayerVehicleID(playerid); SetVehiclePos(VehicleID,2242.7576,1963.9232,31.4417); SetVehicleZAngle(GetPlayerVehicleID(playerid), 271.7270); GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD3 ( /tpd3 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); } else { GetPlayerName(playerid, pname, MAX_PLAYER_NAME); format(string, sizeof(string), "%s Foi Fazer Drift Em TPD3 ( /tpd3 )", pname); SendClientMessageToAll(0xFF9900AA, string); SetPlayerInterior(playerid,0); SetPlayerPos(playerid,2242.7576,1963.9232,31.4417); SetPlayerFacingAngle(playerid, 271.7270); ResetPlayerWeapons(playerid); } } } } }