Teleport on cash?
#1

I tried to create a teleport script, when you type, /lv, a dialog will show you:
Код:
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");
ok, the OnDialogResponse:
Код:
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;
}
i cant do that ~X(, how can i repair this:
Код:
GivePlayerMoney(playerid, (GetPlayerMoney(playerid), if(Money > 49999))) {
~X( please help me
Reply
#2

I suggest you looking trough the SA:MP wiki (http://wiki.sa-mp.com) first, because your code is a mess and you don't seem to understand the basics of the Pawn language.

Also, read pawn-lang.pdf. You can find it with ******.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)