Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //DMFS by JustLuca
- #define FILTERSCRIPT
- #include <a_samp>
- forward SpawnShield(playerid);
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" DM FilterScript LOADED by JustLuca");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid, 0xFF0000FF, "This server use the DM Filterscript by JustLuca (Luca_Tanara).");
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(GetPlayerSpecialAction(playerid) == SPECIAL_ACTION_USEJETPACK)
- {
- Ban(playerid);
- SendClientMessage(playerid, 0xFF0000FF, "Sorry, you can't use Jetpack here. [BANNED]");
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SetTimerEx("SpawnShield", 5000, false,"i");
- SetPlayerHealth(playerid, 9999);
- SendClientMessage(playerid, 0xFF0000FF, "You are immortal for 5 second, you have the spawn shield.");
- return 1;
- }
- public SpawnShield(playerid)
- {
- SendClientMessage(playerid, 0xFF0000FF, "Your spawn shield is finish. Now you are not more immortal.");
- SetPlayerHealth(playerid, 100);
- PlayerPlaySound(playerid, 1056, 0, 0, 0);
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/buygun", cmdtext, true, 6) == 0)
- {
- ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"Select a gun","M4a1 5000$\r\nDesert Eagle 2000$\r\nDouble Colt 500$\r\nPump Shotgun 1500$","Select", "Cancel");
- return 1;
- }
- return 0;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 1)
- {
- switch(dialogid)
- {
- case 1:
- {
- if(!response)
- {
- SendClientMessage(playerid, 0xFF0000FF, "You canceled the select of gun.");
- return 1;
- }
- switch(listitem)
- {
- case 0:
- {
- SendClientMessage(playerid, 0xFF0000FF, "You have bought a M4a1, you pay {00FF00}5000$");
- GivePlayerMoney(playerid, -5000); //Edit the price how you want
- GivePlayerWeapon(playerid, 31, 1000);
- }
- case 1:
- {
- SendClientMessage(playerid, 0xFF0000FF, "You have bought a Desert Eagle, you pay {00FF00}2000$");
- GivePlayerMoney(playerid, -2000); //Edit the price how you want.
- GivePlayerWeapon(playerid, 24, 1000);
- }
- case 2:
- {
- SendClientMessage(playerid, 0xFF0000FF, "You have bought a Double Colt, you pay {00FF00}500$");
- GivePlayerMoney(playerid, -500); //Edit the price how you want
- GivePlayerWeapon(playerid, 22, 1000);
- }
- case 3:
- {
- SendClientMessage(playerid, 0xFF0000FF, "You have bought a Pump Shotgun, you pay {00FF00}1500$");
- GivePlayerMoney(playerid, -1500); //Edit the price how you want
- GivePlayerWeapon(playerid, 25, 1000);
- }
- }
- }
- }
- }
- return 0;
- }
- #endif
Advertisement
Add Comment
Please, Sign In to add comment