Error pls help me
#9

Quote:
Originally Posted by kevi11
Посмотреть сообщение
Guys this command don't give any Material why?
PHP код:
CMD:Compramateriali(playeridparams[])
{
    
ShowPlayerDialog(playerid,7,DIALOG_STYLE_LIST,"Materiali","500 Materiali (500$)\n700 Materiali (900$)\n 1000 Materiali (2000$)","Compra","Esci");
    return 
1;

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid == 7)
    {
        if(
response)
        {
            if(
listitem == 0)
            {
                if(
Materiali[playerid] > 399)
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You have crafted yourself a desert eagle.");
                    
GivePlayerWeapon(playerid249999999);
                    return 
1;
                }
                else
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You dont have enough materials to make that.");
                    return 
1;
                }
            }
            if(
listitem == 1)
            {
                if(
Materiali[playerid] > 149)
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You have crafted yourself a pump-action shotgun.");
                    
GivePlayerWeapon(playerid259999999);
                    return 
1;
                }
                else
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You dont have enough materials to make that.");
                    return 
1;
                }
            }
            if(
listitem == 2)
            {
                if(
Materiali[playerid] > 249)
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You have crafted yourself a MP5.");
                    
GivePlayerWeapon(playerid299999999);
                    return 
1;
                }
                else
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You dont have enough materials to make that.");
                    return 
1;
                }
            }
            if(
listitem == 3)
            {
                if(
Materiali[playerid] > 499)
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You have crafted yourself a M4 carbine.");
                    
GivePlayerWeapon(playerid319999999);
                    return 
1;
                }
                else
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You dont have enough materials to make that.");
                    return 
1;
                }
            }
            if(
listitem == 4)
            {
                if(
Materiali[playerid] > 549)
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You have crafted yourself a Spas-12.");
                    
GivePlayerWeapon(playerid279999999);
                    return 
1;
                }
                else
                {
                    
SendClientMessage(playeridCOLOUR_WHITE"You dont have enough materials to make that.");
                }
            }
        }
    }
    return 
0// Some Script can't used Dialog if you use return 1 .. Lets Make Return 0 for the other script can use dialog

Try this ^^
Reply


Messages In This Thread
Error pls help me - by kevi11 - 27.05.2016, 08:29
Re: Error pls help me - by luke49 - 27.05.2016, 08:39
Re: Error pls help me - by Slawiii - 27.05.2016, 09:09
Re: Error pls help me - by kevi11 - 27.05.2016, 09:16
Re: Error pls help me - by Slawiii - 27.05.2016, 09:21
Re: Error pls help me - by kevi11 - 27.05.2016, 09:26
Re: Error pls help me - by kevi11 - 27.05.2016, 09:28
Re: Error pls help me - by Konstantinos - 27.05.2016, 09:29
Re: Error pls help me - by Amunra - 27.05.2016, 09:34
Re: Error pls help me - by Slawiii - 27.05.2016, 11:40

Forum Jump:


Users browsing this thread: 2 Guest(s)