[FilterScript] /veh command for dealership
#1

PHP код:
#include <a_samp>
#define FILTERSCRIPT
#include <zcmd>
CMD:veh(playeridparams[])
{
    
ShowPlayerDialog(playerid12DIALOG_STYLE_LIST"Vehicle Dealership""Sultan\nNRG\nWashington\nElegy\nBuffalo""Buy""Cancel");
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 12)
    {
        if(!
response)
            return 
1;
        switch(
listitem)
        {
            case 
0:
            {
                if(
GetPlayerMoney(playerid) < 100000)
                    return 
SendClientMessage(playerid0"You dont have enough funds!");
                
GivePlayerMoney(playerid, -100000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(560p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
            case 
1:
            {
                if(
GetPlayerMoney(playerid) < 200000)
                    return 
SendClientMessage(playerid0"You dont have enough funds!");
                
GivePlayerMoney(playerid, -200000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(522p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
            case 
2:
            {
                if(
GetPlayerMoney(playerid) < 50000)
                    return 
SendClientMessage(playerid0"You dont have enough funds!");
                
GivePlayerMoney(playerid, -50000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(421p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
            case 
3:
            {
                if(
GetPlayerMoney(playerid) < 300000)
                    return 
SendClientMessage(playerid0"You dont have enough funds!");
                
GivePlayerMoney(playerid, -300000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(562p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
            case 
4:
            {
                if(
GetPlayerMoney(playerid) < 200000)
                    return 
SendClientMessage(playerid0"You dont have enough funds!");
                
GivePlayerMoney(playerid, -200000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(402p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
        }
    }
    return 
1;

It has all in it as i didnt have time to put it in pastebin so i just uploaded it here!
coomands are - /veh
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)