Small Help
#1

hi
i want make saving vehicles
this my dealership but need save for player and load it with y_ini
+rep
PHP код:
#include <zcmd>
CMD:buycar(playeridparams[])
{
    
ShowPlayerDialog(playerid13DIALOG_STYLE_LIST"Luxurious Car Dealership""Bullet\nInfernus\nHotring\nStretch\nSultan\nSuper GT""Buy""Close");
    return 
1;
}
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 13)
    {
        if(!
response)
            return 
1;
        switch(
listitem)
        {
            case 
0:
            {
                if(
GetPlayerMoney(playerid) < 25000)
                    return 
SendClientMessage(playerid0"You don't have enough cash to buy this car!");
                
GivePlayerMoney(playerid, -25000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(541p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
            case 
1:
            {
                if(
GetPlayerMoney(playerid) < 23000)
                    return 
SendClientMessage(playerid0"You don't have enough cash to buy this car!");
                
GivePlayerMoney(playerid, -23000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(411p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
            case 
2:
            {
                if(
GetPlayerMoney(playerid) < 20000)
                    return 
SendClientMessage(playerid0"You don't have enough cash to buy this car!");
                
GivePlayerMoney(playerid, -20000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(494p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
            case 
3:
            {
                if(
GetPlayerMoney(playerid) < 22000)
                    return 
SendClientMessage(playerid0"You don't have enough cash to buy this car!");
                
GivePlayerMoney(playerid, -22000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(409p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
            case 
4:
            {
                if(
GetPlayerMoney(playerid) < 17000)
                    return 
SendClientMessage(playerid0"You don't have enough cash to buy this car!");
                
GivePlayerMoney(playerid, -17000);
                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 
5:
            {
                if(
GetPlayerMoney(playerid) < 20000)
                    return 
SendClientMessage(playerid0"You don't have enough cash to buy this car!");
                
GivePlayerMoney(playerid, -20000);
                new 
Float:p[4];
                
GetPlayerPos(playeridp[0], p[1], p[2]);
                
GetPlayerFacingAngle(playeridp[3]);
                
CreateVehicle(506p[0], p[1], p[2], p[3]+90, -1, -19999999);
            }
        }
    }
    return 
1;

Reply
#2

bump?
Reply
#3

Bump?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)