Help with Dialogid's
#3

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
 if(dialogid == 1)
 {  
   switch(listitem)
   {
                    case 0:
                    {
                        if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money!");
                        GivePlayerMoney(playerid, -100);
                        SetPlayerPos(playerid, 1079.3356,2293.0444,10.6877);
                        SendClientMessage(playerid, COLOR_YELLOW, "You have been successfully TPed to LV");
                        return 1;
                    }
                    case 1:
                    {
                        if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money!");
                        SetPlayerPos(playerid, 1950.9690,-2300.9600,13.5469);
                        GivePlayerMoney(playerid, -100);
                        SendClientMessage(playerid, COLOR_YELLOW, "You have been successfully TPed to LS airport");
                        return 1;
                    }
                    case 2:
                    {
                        if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money!");
                        SetPlayerPos(playerid, -2373.0525,-32.3702,35.1641);
                        GivePlayerMoney(playerid, -100);
                        SendClientMessage(playerid, COLOR_YELLOW, "You have been successfully TPed to SF");
                        return 1;
                    }
                    case 3:
                    {
                        if(GetPlayerMoney(playerid) < 0) return SendClientMessage(playerid, COLOR_RED, "You have less then $1");
                        GivePlayerMoney(playerid, -1);
                        SetPlayerPos(playerid, 1976.3329,1410.6355,9.2578);
                        SendClientMessage(playerid, COLOR_RED, "You have been TPed back to Spawn.");
                        return 1;
                    }
                    case 4:
                    {
                        if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, "You have less then $100 and are not able to pay for the TP.");
                        GivePlayerMoney(playerid, -100);
                        SetPlayerPos(playerid, 117.8479,2505.7759,16.4844);
                        SendClientMessage(playerid, COLOR_RED, "You have been TPed sucessfully to LV - Abandon Airport.");
                        return 1;
                    }
                    case 5:
                    {
                        if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, "You have less then $100");
                        GivePlayerMoney(playerid, -100);
                        SetPlayerPos(playerid, 134.0241,1951.2173,19.3976);
                        SendClientMessage(playerid, COLOR_RED, "You have been TPed successfully to LV - Area 51");
                        return 1;
                    }

   }
 }
 else if(dialogid == 2)
 {
    switch(listitem)
    {
                case 0:
                {   //turismo
                    new Float:x, Float:y, Float:z,Float:a;
                    GetPlayerPos(playerid, x, y, z);
                    GetPlayerFacingAngle(playerid, a);
                    CreateVehicle(451, x, y, z, a, -1,-1, -1);
                    SendClientMessage(playerid, COLOR_GREEN, "Your chosen vehicle has spawned.");
                    return 1;
                }
                case 1: //maverick
                {   new Float:x, Float:y, Float:z, Float:a;
                    GetPlayerPos(playerid, x, y, z);
                    GetPlayerFacingAngle(playerid, a);
                    CreateVehicle(487, x, y, z, a, -1, -1, -1);
                    SendClientMessage(playerid, COLOR_GREEN, "Your chosen vehicle has spawned.");
                    return 1;
                }
                case 2: //andromeda
                {
                    new Float:x, Float:y, Float:z, Float:a;
                    GetPlayerPos(playerid, x, y, z);
                    GetPlayerFacingAngle(playerid, a);
                    CreateVehicle(592, 2+x, 2+y, z, a, -1, -1, -1);
                    SendClientMessage(playerid, COLOR_GREEN, "Your chosen vehicle has spawned.");
                    return 1;
                }
                case 3://Hydra
                {
                    new Float:x, Float:y, Float:z, Float:a;
                    GetPlayerPos(playerid, x, y, z);
                    GetPlayerFacingAngle(playerid, a);
                    CreateVehicle(520, 2+x, 2+y, z, a, -1, -1, -1);
                    SendClientMessage(playerid, COLOR_GREEN, "Your chosen vehicle has spawned.");
                    return 1;
                }
                case 4://NRG-500
                {
                    new Float:x, Float:y, Float:z, Float:a;
                    GetPlayerPos(playerid, x, y, z);
                    GetPlayerFacingAngle(playerid, a);
                    CreateVehicle(522, 2+x, 2+y, z, a, -1, -1, -1);
                    SendClientMessage(playerid, COLOR_GREEN, "Your chosen vehicle has spawned.");
                    return 1;
                }
                case 5://AT-400(Boeing)
                {
                    new Float:x, Float:y, Float:z, Float:a;
                    GetPlayerPos(playerid, x, y, z);
                    GetPlayerFacingAngle(playerid, a);
                    CreateVehicle(577, 2+x, 2+y, z, a, -1, -1, -1);
                    SendClientMessage(playerid, COLOR_GREEN, "Your chosen vehicle has spawned.");
                    return 1;
                }
    }
 }
 return 0;
}
Reply


Messages In This Thread
Help with Dialogid's - by Karol56 - 12.09.2012, 14:13
Re: Help with Dialogid's - by Karol56 - 14.09.2012, 21:10
Re: Help with Dialogid's - by HuSs3n - 14.09.2012, 23:17
Re: Help with Dialogid's - by Karol56 - 15.09.2012, 00:04

Forum Jump:


Users browsing this thread: 1 Guest(s)