Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #define MAX_PLAYERS (500)
- new pica[MAX_PLAYERS];
- #define DIALOG_Valgis 1
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2> //if your using new version it should be like this
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- main()
- {
- print("\n----------------------------------");
- print(" Blank Gamemode by your name here");
- print("----------------------------------\n");
- }
- #endif
- public OnPlayerConnect(playerid)
- {
- SetTimerEx("Lolas",60000,true,"e",playerid);
- return 1;
- }
- forward Lolas(playerid);
- public Lolas(playerid)
- {
- AtimamGyv(playerid,5);
- return 1;
- }
- stock AtimamGyv(playerid,value)
- {
- new Float:health;
- GetPlayerHealth(playerid,health);
- SetPlayerHealth(playerid,health - value);
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_Valgis)
- {
- if(response)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Pavalgei uz 15LT!");
- new Float:health;
- GetPlayerHealth(playerid,health);
- SetPlayerHealth(playerid,health +20);
- GivePlayerMoney(playerid, -15);
- ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,1,1,1,1,1);
- SetPlayerAttachedObject(playerid, 1, 2702, 6,0.1,0,0,45,135);
- pica[playerid]=true;
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "Nepavalgei.");
- }
- return 1;
- }
- return 0;
- }
- CMD:valgyti(playerid, params[])
- {
- ShowPlayerDialog(playerid, DIALOG_Valgis, DIALOG_STYLE_MSGBOX, "Valgis", "Nori pavalgyti? Kaina 15LT", "Noriu", "Nenoriu");
- return 1;
- }
- CMD:imp(playerid, params[])
- {
- if(!pica[playerid])
- {
- SendClientMessage(playerid,-1,"Neturi ko ismesti");
- return 1;
- }
- SendClientMessage(playerid, COLOR_GREEN, "Ismetei picos gabaliuka!");
- ApplyAnimation(playerid,"BSKTBALL","BBALL_def_jump_shot",4.1,0,1,1,1,1,1);
- if(IsPlayerAttachedObjectSlotUsed(playerid, 1)) RemovePlayerAttachedObject(playerid, 1);
- pica[playerid]=false;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment