Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Elections [FS] By Leo */
- #include <a_samp>
- #Define SendClientMessage SCM
- //---------------------------------------------------
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == Mayor)
- ShowPlayerDialog(playerid,1547,DIALOG_STYLE_INPUT,"Want to Become the Mayor ?","Insert your name Here:","Done","Exit");
- return 1;
- }
- //---------------------------------------------------
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/startelections", cmdtext, true, 10) == 0)
- {
- Elections();
- if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"You are not authorized to use this command don't miss around");
- return 1;
- }
- return 0;
- }
- //-----------------------------------------------------
- Forward Elections();
- public Elections();
- {
- SendClientMessageToAll(-1,"Elections Started Vote for the best!");
- )
- //-----------------------------------------------------
- new Mayor;
- public OnFilterScriptInit()
- {
- Mayor = AddStaticPickup(1239, 1, 1492.5117,-1770.6157,18.7958, 0);
- print("\n--------------------------------------");
- print(" ` Elections System By Leo ");
- print("--------------------------------------\n");
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 1547)
- (
- if(!response) return SendClientMessage(playerid, -1, "Okay Bye");
- if(response)
- (
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment