SA-MP Forums Archive
PLEASE HELP WHY DONT THIS WORK PLEASE - 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: PLEASE HELP WHY DONT THIS WORK PLEASE (/showthread.php?tid=348309)



PLEASE HELP WHY DONT THIS WORK PLEASE - Geniuss - 04.06.2012

I am trying to make it so you can deposit or withdraw guns from the car boto but it is just not working please help me

pawn Код:
command(carbootdepositgun, playerid, params[])
{
    #pragma unused params
    if(IsPlayerNearBoot(playerid, Player[playerid][CarLinkID], 2.0))
    {
        if(Player[playerid][CarBootOpen] == 1)
        {
            ShowPlayerDialog(playerid, 1005, DIALOG_STYLE_LIST, "Deposit", "Car Slot 1\n Car Slot 2\n Car Slot 3", "Ok", "Close");
        }
    }
}
pawn Код:
case 1005:
            {
                if(listitem == 0)
                {
                    new gun1 = GetPlayerWeapon(playerid);
                    Player[playerid][CarWeapon1] = gun1;
                    GivePlayerWeapon(playerid, 0, 0);
                }
            }
pawn Код:
command(carbootwithdrawgun, playerid, params[])
{
    #pragma unused params
    new string[128];
    if(IsPlayerNearBoot(playerid, Player[playerid][CarLinkID], 2.0))
    {
        if(Player[playerid][CarBootOpen] == 1)
        {
            format(string, sizeof(string), "%s", Player[playerid][CarWeapon1]);
            ShowPlayerDialog(playerid, 1006, DIALOG_STYLE_LIST, "Withdraw", string, "Ok", "Close");
        }
    }
}
pawn Код:
command(carbootwithdrawgun, playerid, params[])
{
    #pragma unused params
    new string[128];
    if(IsPlayerNearBoot(playerid, Player[playerid][CarLinkID], 2.0))
    {
        if(Player[playerid][CarBootOpen] == 1)
        {
            format(string, sizeof(string), "%s", Player[playerid][CarWeapon1]);
            ShowPlayerDialog(playerid, 1006, DIALOG_STYLE_LIST, "Withdraw", string, "Ok", "Close");
        }
    }
}
Thank You

Help Is Appreciated