SA-MP Forums Archive
Bug - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Bug (/showthread.php?tid=475369)



Bug - aDo7 - 12.11.2013

Hi,
When i use cmd:ads there're menu opened like Next Generation Gaming Server but when i choose any thing from the menu, nothing happen i don't know why?
There're codes
PHP код:
CMD:ad(playeridparams[])
{
    
SendClientMessageEx(playeridCOLOR_WHITE"The /ad command has been removed - use /ads or /advertisements.");
    return 
1;
}
CMD:ads(playeridparams[]) {
    return 
cmd_advertisements(playeridparams);
}
CMD:advertisements(playeridparams[]) {
    if(
gPlayerLogged{playerid} == 0) {
        
SendClientMessageEx(playeridCOLOR_GREY"You're not logged in.");
    }
    else if(
GetPVarType(playerid"Injured")) {
        
SendClientMessageEx(playeridCOLOR_GREY"You can't use advertisements while injured.");
    }
    else if(
PlayerCuffed[playerid] != 0) {
        
SendClientMessageEx(playeridCOLOR_GREY"You can't use advertisements right now.");
    }
    else if(
PlayerInfo[playerid][pJailTime] > 0) {
        
SendClientMessageEx(playeridCOLOR_GREY"You can't use advertisements while in jail.");
    }
    else 
ShowPlayerDialog(playeridDIALOG_ADMAINDIALOG_STYLE_LIST"Advertisements""List Advertisements\nSearch Advertisements\nPlace Advertisement\nPlace Priority Advertisement""Select""Cancel");
    return 
1;




Re: Bug - Loot - 12.11.2013

You haven't declared anything regarding that dialogid, and no, that's certainly not a bug.
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    switch(dialogid)
    {
        case DIALOG_ADMAIN:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0: // do stuff here - List Advertisements
                    case 1: // Search Advertisements
                    case 2: // Place Advertisement
                    case 3: // Priority Advertisement
                    // etc..
                }
            }
        }      
    }
    return 1;
}



Re: Bug - aDo7 - 12.11.2013

Should i add this codes?


Re: Bug - Loot - 12.11.2013

Are you seriously asking or..?


Re: Bug - aDo7 - 12.11.2013

Quote:

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_ADMAIN:
{
if(response)
{
switch(listitem)
{
case 0: // do stuff here - List Advertisements
case 1: // Search Advertisements
case 2: // Place Advertisement
case 3: // Priority Advertisement
// etc..
}
}
}
}
return 1;
}

I dont have this codes in my script but this list which appeared when any one use /ads
Quote:

{
case 0: // do stuff here - List Advertisements
case 1: // Search Advertisements
case 2: // Place Advertisement
case 3: // Priority Advertisement




Re: Bug - Loot - 12.11.2013

I'm sorry, if you can't understand the code above, I cannot help you further.


Re: Bug - aDo7 - 12.11.2013

Quote:

Are you seriously asking or..?

Listen i seriously asking because i don't know any thing about how to script :/
Just little bit..


Re: Bug - Loot - 12.11.2013

Go and study programming in general before trying to jump into a project which you can't handle, with all honesty.


Re: Bug - aDo7 - 12.11.2013

Quote:

Go and study programming in general before trying to jump into a project which you can't handle, with all honesty.

I Promise you that i will try to study them, but that's the only problem on my server so i want to fix you just define to me to how to add the lost codes., Please if you want i need help..


Re: Bug - aDo7 - 12.11.2013

Bump any one help me?