12.12.2010, 17:29
I tried to create a teleport script, when you type, /lv, a dialog will show you:
ok, the OnDialogResponse:
i cant do that ~X(, how can i repair this:
~X( please help me
Код:
ShowPlayerDialog(playerid, LvTele, DIALOG_STYLE_MSGBOX,"{ff9933}[{66ff33}TELEPORT INFO{ff9933}]","{ff9933}Are you shure that you want to teleport to {ff3300}Las Venturas{ff9933} for {66ff33}50.000 ${ff9933}?","Yes","No");
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { if(dialogid == LvTele) { if(response) { GivePlayerMoney(playerid, (GetPlayerMoney(playerid), if(Money > 49999))) { ResetPlayerWeapons(playerid); if (IsPlayerInAnyVehicle(playerid)) { SetVehiclePos(GetPlayerVehicleID(playerid),2037.5223,1517.9135,10.4708 ); SetVehicleZAngle(GetPlayerVehicleID(playerid), 2.6085); LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0); } if (!IsPlayerInAnyVehicle(playerid)) { SetPlayerPos(playerid,2024.3549,1544.8292,10.8194 ); SetPlayerFacingAngle(playerid, 275.2537); SetPlayerInterior(playerid, 0); } SendClientMessage(playerid, 0xFFFF00AA, "{ff9933}[{66ff33}SPAWN{ff9933}] Welcome to {ff3300}Las Venturas{ff9933}!"); SetPlayerWorldBounds(playerid, 20000.0000,-20000.0000,20000.0000,-20000.0000); // Bounderies Off// } else { SendClientMessage(playerid, COLOR_RED, "{ff9933}[{ff3300}ERROR{ff9933}] You don't have enought cash!"); } return 1; } return 0; }
Код:
GivePlayerMoney(playerid, (GetPlayerMoney(playerid), if(Money > 49999))) {