Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- |~) _ \ /
- |~\(_) \/\/
- /\ _| _ _ _ _ _|
- /~~\(_|\/(_|| |(_(/_(_|
- \ / _ _ _ _ _
- \/\/ (/_(_||_)(_)| |
- |
- (~ __|_ _ _ _
- _)\/_\ | (/_| | |
- /
- v 1.0
- ================================================================================
- Include's
- ==============================================================================*/
- #include <a_samp>
- #include <zcmd>
- //==============================================================================
- // Dialog Zone
- //==============================================================================
- #define ammo 14204
- //==============================================================================
- // Culori
- //==============================================================================
- #define W "{FFFFFF}"
- #define R "{FF0000}"
- #define O "{FF8000}"
- //==============================================================================
- // Prescurtari functii
- //==============================================================================
- #define SCM SendClientMessage
- #define SCMToAll SendClientMessageToAll
- #define GMT GameTextForPlayer
- public OnFilterScriptInit()
- {
- print("\n======================================");
- print(" RoW Advanced Weapon System Loaded");
- print("======================================\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n======================================");
- print(" RoW Advanced Weapon System UnLoaded");
- print("======================================\n");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case ammo:
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:{ShowPlayerDialog(playerid,ammo+1,DIALOG_STYLE_INPUT,""O"D"W"eagle",""O"Scrie "W"cate gloante vrei e "R"5$/glont!\n","Ok","Back");}
- case 1:{ShowPlayerDialog(playerid,ammo+2,DIALOG_STYLE_INPUT,""O"M"W"4",""O"Scrie "W"cate gloante vrei e "R"15$/glont!\n","Ok","Back");}
- case 2:{ShowPlayerDialog(playerid,ammo+3,DIALOG_STYLE_INPUT,""O"A"W"k47",""O"Scrie "W"cate gloante vrei e "R"14$/glont!\n","Ok","Back");}
- case 3:{ShowPlayerDialog(playerid,ammo+4,DIALOG_STYLE_INPUT,""O"M"W"P5",""O"Scrie "W"cate gloante vrei e "R"11$/glont!\n","Ok","Back");}
- case 4:{ShowPlayerDialog(playerid,ammo+5,DIALOG_STYLE_INPUT,""O"S"W"niper",""O"Scrie "W"cate gloante vrei e "R"20$/glont!\n","Ok","Back");}
- case 5:{ShowPlayerDialog(playerid,ammo+6,DIALOG_STYLE_INPUT,""O"S"W"hotGun",""O"Scrie "W"cate gloante vrei e "R"13$/glont!\n","Ok","Back");}
- case 6:{ShowPlayerDialog(playerid,ammo+7,DIALOG_STYLE_INPUT,""O"S"W"awnoff ShotGun",""O"Scrie "W"cate gloante vrei e "R"18$/glont!\n","Ok","Back");}
- case 7:{ShowPlayerDialog(playerid,ammo+8,DIALOG_STYLE_INPUT,""O"T"W"ec-9",""O"Scrie "W"cate gloante vrei e "R"3$/glont!\n","Ok","Back");}
- }
- }
- }
- case ammo + 1:
- {
- if(!response)
- return ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- if(response)
- {
- new str[128];
- if(GetPlayerMoney(playerid) < strval(inputtext)* 5)
- return SendClientMessage(playerid,-1,"Nu ai atatia bani");
- if(strval(inputtext) < 10)
- return SCM(playerid,-1,"Nu poti cumpara mai putin de 10 gloante!!");
- GivePlayerWeapon(playerid,24,strval(inputtext));
- GivePlayerMoney(playerid,-strval(inputtext)* 5);
- format(str,128,""R"** "O"%s "W"a cumparat un Deagle cu "R"%d "W"gloante "R"**",GetName(playerid),strval(inputtext));
- SCMToAll(-1,str);
- }
- }
- case ammo + 2:
- {
- if(!response)
- return ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- if(response)
- {
- new str[128];
- if(GetPlayerMoney(playerid) < strval(inputtext)* 15)
- return SendClientMessage(playerid,-1,""R"Nu ai atatia bani");
- if(strval(inputtext) < 10)
- return SCM(playerid,-1,""R"Nu poti cumpara mai putin de "O"10 "R"gloante!!");
- GivePlayerWeapon(playerid,31,strval(inputtext));
- GivePlayerMoney(playerid,-strval(inputtext)* 15);
- format(str,128,""R"** "O"%s "W"a cumparat un M4 cu "R"%d "W"gloante "R"**",GetName(playerid),strval(inputtext));
- SCMToAll(-1,str);
- }
- }
- case ammo + 3:
- {
- if(!response)
- return ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- if(response)
- {
- new str[128];
- if(GetPlayerMoney(playerid) < strval(inputtext)* 14)
- return SendClientMessage(playerid,-1,""R"Nu ai atatia bani");
- if(strval(inputtext) < 10)
- return SCM(playerid,-1,""R"Nu poti cumpara mai putin de "O"10 "R"gloante!!");
- GivePlayerWeapon(playerid,30,strval(inputtext));
- GivePlayerMoney(playerid,-strval(inputtext)* 14);
- format(str,128,""R"** "O"%s "W"a cumparat un Ak47 cu "R"%d "W"gloante "R"**",GetName(playerid),strval(inputtext));
- SCMToAll(-1,str);
- }
- }
- case ammo + 4:
- {
- if(!response)
- return ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- if(response)
- {
- new str[128];
- if(GetPlayerMoney(playerid) < strval(inputtext)* 11)
- return SendClientMessage(playerid,-1,""R"Nu ai atatia bani");
- if(strval(inputtext) < 10)
- return SCM(playerid,-1,""R"Nu poti cumpara mai putin de "O"10 "R"gloante!!");
- GivePlayerWeapon(playerid,29,strval(inputtext));
- GivePlayerMoney(playerid,-strval(inputtext)* 11);
- format(str,128,""R"** "O"%s "W"a cumparat un MP5 cu "R"%d "W"gloante "R"**",GetName(playerid),strval(inputtext));
- SCMToAll(-1,str);
- }
- }
- case ammo + 5:
- {
- if(!response)
- return ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- if(response)
- {
- new str[128];
- if(GetPlayerMoney(playerid) < strval(inputtext)* 20)
- return SendClientMessage(playerid,-1,""R"Nu ai atatia bani");
- if(strval(inputtext) < 10)
- return SCM(playerid,-1,""R"Nu poti cumpara mai putin de "O"10 "R"gloante!!");
- GivePlayerWeapon(playerid,34,strval(inputtext));
- GivePlayerMoney(playerid,-strval(inputtext)* 20);
- format(str,128,""R"** "O"%s "W"a cumparat un Sniper cu "R"%d "W"gloante "R"**",GetName(playerid),strval(inputtext));
- SCMToAll(-1,str);
- }
- }
- case ammo + 6:
- {
- if(!response)
- return ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- if(response)
- {
- new str[128];
- if(GetPlayerMoney(playerid) < strval(inputtext)* 13)
- return SendClientMessage(playerid,-1,""R"Nu ai atatia bani");
- if(strval(inputtext) < 10)
- return SCM(playerid,-1,""R"Nu poti cumpara mai putin de "O"10 "R"gloante!!");
- GivePlayerWeapon(playerid,25,strval(inputtext));
- GivePlayerMoney(playerid,-strval(inputtext)* 13);
- format(str,128,""R"** "O"%s "W"a cumparat un ShotGun cu "R"%d "W"gloante "R"**",GetName(playerid),strval(inputtext));
- SCMToAll(-1,str);
- }
- }
- case ammo + 7:
- {
- if(!response)
- return ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- if(response)
- {
- new str[128];
- if(GetPlayerMoney(playerid) < strval(inputtext)* 18)
- return SendClientMessage(playerid,-1,""R"Nu ai atatia bani");
- if(strval(inputtext) < 10)
- return SCM(playerid,-1,""R"Nu poti cumpara mai putin de "O"10 "R"gloante!!");
- GivePlayerWeapon(playerid,26,strval(inputtext));
- GivePlayerMoney(playerid,-strval(inputtext)* 18);
- format(str,128,""R"** "O"%s "W"a cumparat un Sawnoff ShotGun cu "R"%d "W"gloante "R"**",GetName(playerid),strval(inputtext));
- SCMToAll(-1,str);
- }
- }
- case ammo + 8:
- {
- if(!response)
- return ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- if(response)
- {
- new str[128];
- if(GetPlayerMoney(playerid) < strval(inputtext)* 3)
- return SendClientMessage(playerid,-1,""R"Nu ai atatia bani");
- if(strval(inputtext) < 10)
- return SCM(playerid,-1,""R"Nu poti cumpara mai putin de "O"10 "R"gloante!!");
- GivePlayerWeapon(playerid,26,strval(inputtext));
- GivePlayerMoney(playerid,-strval(inputtext)* 3);
- format(str,128,""R"** "O"%s "W"a cumparat un Tec-9 cu "R"%d "W"gloante "R"**",GetName(playerid),strval(inputtext));
- SCMToAll(-1,str);
- }
- }
- }
- return 1;
- }
- CMD:arme(playerid,params[])
- {
- ShowPlayerDialog(playerid,ammo,DIALOG_STYLE_LIST,"Wdialog",Weapon(),"Ok","Cancel");
- return 1;
- }
- //==============================================================================
- // Stock's
- //==============================================================================
- stock Weapon()
- {
- new Wdialog[1000];
- Wdialog[0]='\0';
- strcat(Wdialog,""O"D"W"eagle - ( "R"5$/glont"W" )\n"O"M"W"4 - ( "R"15$/glont"W" )\n"O"A"W"k47 - ( "R"14$/glont"W" )\n",1000);
- strcat(Wdialog,""O"M"W"P5 - ( "R"11$/glont"W" )\n"O"S"W"niper - ( "R"20$/glont"W" )\n"O"S"W"hotgun - ( "R"13/glont"W" )\n",1000);
- strcat(Wdialog,""O"S"W"awnoff Shotgun - ( "R"18/glont"W" )\n"O"T"W"ec-9 - ( "R"3/glont "W" )\n",1000);
- strcat(Wdialog,"\n",1000);
- strcat(Wdialog,"\n",1000);
- return Wdialog;
- }
- stock GetName(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, MAX_PLAYER_NAME);
- return name;
- }
Advertisement
Add Comment
Please, Sign In to add comment