04.06.2012, 23:35
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
Thank You
Help Is Appreciated
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");
}
}
}
Help Is Appreciated