thedark222

Elections system

May 22nd, 2012
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.43 KB | None | 0 0
  1. /*           Elections [FS]   By Leo        */
  2.  
  3. #include <a_samp>
  4. #Define SendClientMessage   SCM
  5. //---------------------------------------------------
  6. public OnPlayerPickUpPickup(playerid, pickupid)
  7. {
  8.     if(pickupid == Mayor)
  9.     ShowPlayerDialog(playerid,1547,DIALOG_STYLE_INPUT,"Want to Become the Mayor ?","Insert your name Here:","Done","Exit");
  10.  
  11.     return 1;
  12. }
  13. //---------------------------------------------------
  14. public OnPlayerCommandText(playerid, cmdtext[])
  15. {
  16.     if (strcmp("/startelections", cmdtext, true, 10) == 0)
  17.     {
  18.         Elections();
  19.         if(!IsPlayerAdmin(playerid)) return SCM(playerid,-1,"You are not authorized to use this command don't miss around");
  20.         return 1;
  21.     }
  22.     return 0;
  23. }
  24. //-----------------------------------------------------
  25. Forward Elections();
  26. public Elections();
  27. {
  28.     SendClientMessageToAll(-1,"Elections Started Vote for the best!");
  29.    
  30. )
  31. //-----------------------------------------------------
  32. new Mayor;
  33.  
  34. public OnFilterScriptInit()
  35. {
  36.     Mayor = AddStaticPickup(1239, 1, 1492.5117,-1770.6157,18.7958, 0);
  37.  
  38.     print("\n--------------------------------------");
  39.     print(" `       Elections System By Leo        ");
  40.     print("--------------------------------------\n");
  41.     return 1;
  42. }
  43.  
  44. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  45. {
  46.     if(dialogid == 1547)
  47.     (
  48.         if(!response) return SendClientMessage(playerid, -1, "Okay Bye");
  49.         if(response)
  50.         (
  51.  
  52.     return 1;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment