Jump to content

Problema script


Turbyn3.

Recommended Posts

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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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;
    }

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.