27.01.2013, 13:43
Second Filterscript by Me
Need Include :
Need Include :
PHP Code:
#include <a_samp>
#include <zcmd>
#include <color>
PHP Code:
#include <a_samp>
#include <zcmd>
#include <color>
#define weapon_spawner 0
#define page2 1
#define page3 2
#define page4 3
public OnFilterScriptInit()
{
print("Weapon Spawner By Faiz");
return 1;
}
public OnFilterScriptExit()
{
print("Weapon Spawner By Faiz");
return 1;
}
CMD:weapon(playerid, params[])
{
ShowPlayerDialog(playerid, weapon_spawner, DIALOG_STYLE_LIST, "Weapons Page 1", "Katana\n Baseball Bat\n ChainSaw\n Next Page", "Select", "Cancel");
return 1;
}
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == weapon_spawner)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 8, 1);
SendClientMessage(playerid, COLOR_RED, "You Spawn Katana");
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 5, 1);
SendClientMessage(playerid, COLOR_RED, "You Spawn Baseball Bat");
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 9, 1);
SendClientMessage(playerid, COLOR_RED, "You Spawn Chainsaw");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, page2, DIALOG_STYLE_LIST, "Weapons Page 2", "Ak47\nM4\nMinigun\nGrenade\nNext Page", "Select", "Cancel");
}
}
}
if(dialogid == page2)
{
if(response)
{
if(listitem == 0)
{
GivePlayerWeapon(playerid, 30, 100);
SendClientMessage(playerid, COLOR_RED, "You Spawn AK47");
}
if(listitem == 1)
{
GivePlayerWeapon(playerid, 31, 100);
SendClientMessage(playerid, COLOR_RED, "You Spawn M4");
}
if(listitem == 2)
{
GivePlayerWeapon(playerid, 38, 100);
SendClientMessage(playerid, COLOR_RED, "You Spawn Minigun");
}
if(listitem == 3)
{
GivePlayerWeapon(playerid, 16, 100);
SendClientMessage(playerid, COLOR_RED, "You Spawn Grenade");
}
if(listitem == 4)
{
ShowPlayerDialog(playerid, page3, DIALOG_STYLE_LIST, "Weapons Page 3", "Pistol\nSawnoff Shotgun\nMP5\nRPG\nNext Page", "Select", "Cancel");
}
}
}
return 1;
}