14.07.2012, 17:36
so i've got this code here.
When i type /weapons
it doesn't show Sniper rifle weapon and all choices after it , why?
Also , when i press Close it still buys the weapon , what's needed to close the dialog on clicking close?
pawn Код:
CMD:weapons(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,COLOR_RED,"You can not use this command while you are in a vehicle");
else if(!IsPlayerInAnyVehicle(playerid))
{
new Weapons[256];
strcat(Weapons,""#COL_WHITE"1):Silenced Pistol (100$)\n"#COL_WHITE"2): Deagle (200$)\n"#COL_YELLOW"3): Shotgun (500$)\n"#COL_YELLOW"4): Combat Shotgun (1000$)\n");
strcat(Weapons,""#COL_YELLOW"5): Sawnoff-Shotgun (500$)\n"#COL_ORANGE"6):UZI (300$)\n");
strcat(Weapons,""#COL_ORANGE"7): Tec9 (300$)\n"#COL_ORANGE"8): M4 (1000$)\n"#COL_ORANGE"9): MP5 (1000$)\n 10):Sniper (2000$)\n");
strcat(Weapons,""#COL_RED""#COL_RED"11): Parachute (50$)\n");
strcat(Weapons,""#COL_RED"12): Baseball Bat (500$)\n");
strcat(Weapons,""#COL_RED"13): Chain Saw(10000$)\n");
strcat(Weapons,""#COL_RED"14): Katana(500$)\n "#COL_RED"13): Pool Cue(500$)\n");
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Weapons:",Weapons,"OK", "Close");
}
return 1;
}
it doesn't show Sniper rifle weapon and all choices after it , why?
Also , when i press Close it still buys the weapon , what's needed to close the dialog on clicking close?