28.12.2014, 13:28
(
Последний раз редактировалось Zeel; 28.12.2014 в 15:05.
)
Simple Weapon Dialog.
Info:-
When you spawn it shows you a dialog with two weapons packages
Package 1 :
Shawn-OFF Shotgun, UZI, Desert Eagle, AK47. Each weapon with 5000 bullets.
Package 2 :
MP5, M4, Sniper, ShotGun Each weapon with 5000 bullets
And when you choose a package it shows you a text with the packages includes you picked.
I'm not a very good coder, but still I can code.
Screenshots :


Link for pastebin code :- Info:-
When you spawn it shows you a dialog with two weapons packages
Package 1 :
Shawn-OFF Shotgun, UZI, Desert Eagle, AK47. Each weapon with 5000 bullets.
Package 2 :
MP5, M4, Sniper, ShotGun Each weapon with 5000 bullets
And when you choose a package it shows you a text with the packages includes you picked.
I'm not a very good coder, but still I can code.

Screenshots :


http://pastebin.com/T748nhQe
Код:
#define FILTERSCRIPT
#define DIALOG_WEAPON 2
#define COLOR_RED 0xAA3333AA
#include <a_samp>
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Weapons Dialog By Zeal");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
main()
{
print("\n----------------------------------");
print("Weapons Dialog By Zeal");
print("----------------------------------\n");
}
public OnPlayerSpawn(playerid)
{
ShowPlayerDialog(playerid, DIALOG_WEAPON, DIALOG_STYLE_LIST, "Weapons Packages By Zeal", "Package 1\nPackage 2", "Select", "Exit");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 2)
{
if(response)
{
if(listitem == 0)
GivePlayerWeapon(playerid, 28, 5000);
GivePlayerWeapon(playerid, 26, 5000);
GivePlayerWeapon(playerid, 30, 5000);
GivePlayerWeapon(playerid, 24, 5000);
SendClientMessage(playerid, COLOR_RED, "You picked Package 1 - Shawn-OFF Shotgun, UZI, Desert Eagle, AK47. Each weapon with 5000 bullets.");
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 29, 5000);
GivePlayerWeapon(playerid, 31, 5000);
GivePlayerWeapon(playerid, 34, 5000);
GivePlayerWeapon(playerid, 25, 5000);
SendClientMessage(playerid, COLOR_RED, "You picked Package 2 - MP5, M4, Sniper, ShotGun Each weapon with 5000 bullets ");
}
return 1;
}
return 1;
}
Bugs :-
There is no bugs, if there is report them in replies.
Credits :-
All credits returns to Zeal/Zeel.
Feel free to do anything with this script!

Kind regards,
Zeel.



