Jump to content

Recommended Posts

Posted

Am un bug la dealership, cand dau /buyvehicle imi apar 4 categorii ( Masini Ieftine, Masini Medii, Masini Scumpe, Masini Premium)

Cand dau pe primele 3, ma scoate din meniul /buycar, pot sa cumpar doar Masini Premium. Stie cineva cum pot sa rezolv asta?

Posted (edited)

#define DIALOG_CARBUY                 72
#define DIALOG_CARBUY2                 74
#define DIALOG_CARBUY3                 75
#define DIALOG_CARBUY4                 76

Edited by Turbyn3.
Posted

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    new sendername[25];
    new string[300];
    for(new i; i < sizeof(antisqlinjection); i++)
    {
        if(strfind(inputtext, antisqlinjection, true) != -1)
        {
            new advertiser[MAX_PLAYER_NAME];
            GetPlayerName(playerid, advertiser, sizeof(advertiser));
            format(string, sizeof(string), "%s a primit kick de la AdmBot, motiv: Flood-Server", advertiser);
            SendClientMessageToAll(COLOR_LIGHTRED,string);
            Kick(playerid);
            return 1;

 

cand dau sa caute ondialogresponse doar asta imi gaseste

Posted
51 minutes ago, Turbyn3. said:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new vehicleid = GetPlayerVehicleID(playerid);
    new sendername[25];
    new string[300];
    for(new i; i < sizeof(antisqlinjection); i++)
    {
        if(strfind(inputtext, antisqlinjection, true) != -1)
        {
            new advertiser[MAX_PLAYER_NAME];
            GetPlayerName(playerid, advertiser, sizeof(advertiser));
            format(string, sizeof(string), "%s a primit kick de la AdmBot, motiv: Flood-Server", advertiser);
            SendClientMessageToAll(COLOR_LIGHTRED,string);
            Kick(playerid);
            return 1;

 

cand dau sa caute ondialogresponse doar asta imi gaseste

if(dialogid == DIALOG_CARBUY)

Posted

if(dialogid == DIALOG_CARBUY)
    {
        if(response)
        {
            if(listitem == 0)
            {
                new stringzz[MAX_STRING],stringy[MAX_STRING];
                for(new xf = 0; xf < MAX_PERSONAL_CARS; xf++)
                {
                    if(Stock[xf][vPrice] > 0 && Stock[xf][vPrice] <= 7000000)
                    {
                        format(stringy, sizeof(stringy), "%s ($%d) - %d in stock\n", Stock[xf][vName], Stock[xf][vPrice], Stock[xf][vStock]);
                          strcat(stringzz,stringy);
                    }
                }
                ShowPlayerDialog(playerid, DIALOG_CARBUY2, DIALOG_STYLE_LIST, "Buy a car", stringzz, "Select", "Close");
            }
            if(listitem == 1)
            {
                new stringzz[MAX_STRING],stringy[MAX_STRING];
                for(new xf = 0; xf < MAX_PERSONAL_CARS; xf++)
                {
                    if(Stock[xf][vPrice] > 7000000 && Stock[xf][vPrice] <= 19999999)
                    {
                        format(stringy, sizeof(stringy), "%s ($%d) - %d in stock\n", Stock[xf][vName], Stock[xf][vPrice], Stock[xf][vStock]);
                          strcat(stringzz,stringy);
                    }
                }
                ShowPlayerDialog(playerid, DIALOG_CARBUY3, DIALOG_STYLE_LIST, "Buy a car", stringzz, "Select", "Close");
            }
            if(listitem == 2)
            {
                new stringzz[MAX_STRING],stringy[MAX_STRING];
                for(new xf = 0; xf < MAX_PERSONAL_CARS; xf++)
                {
                    if(Stock[xf][vPrice] >= 20000000 && Stock[xf][vPrice] < 200000000)
                    {
                        format(stringy, sizeof(stringy), "%s ($%d) - %d in stock\n", Stock[xf][vName], Stock[xf][vPrice], Stock[xf][vStock]);
                          strcat(stringzz,stringy);
                    }
                }
                ShowPlayerDialog(playerid, DIALOG_CARBUY4, DIALOG_STYLE_LIST, "Buy a car", stringzz, "Select", "Close");
            }
            if(listitem == 3)
            {
                new string2[MAX_STRING];
                format(string2,sizeof(string2),"Sparrow - 230 premium points\nHotring Racer - 250 premium points\nVortex - 250 premium points\nHotring Racer A - 250 premium points\nHotring Racer B - 250 premium points\nMaverick - 300 premium points");
                ShowPlayerDialog(playerid, DIALOG_CARBUY8, DIALOG_STYLE_LIST, "Buy a car", string2, "Select", "Close");
            }
        }
        return 1;
    }

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.