burnfire

BAdmin (experimental phase)

Mar 17th, 2013
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 5.13 KB | None | 0 0
  1. /*
  2. *Scripted by burnfire!
  3. *Created for GTA.Know.RO server
  4. */
  5.  
  6. /*SOF*/
  7. /*Includes*/
  8. #include <a_samp>
  9. #include <sscanf>
  10. #include <zcmd>
  11. #include <SII>
  12.  
  13. /*ENUMS AND NEWS*/
  14. enum gPlayerInfo
  15. {
  16.  level,
  17.  vip,
  18.  score,
  19.  coins,
  20.  cash,
  21.  log,
  22.  reg
  23. }
  24. new PInfo[MAX_PLAYERS][gPlayerInfo];
  25.  
  26.  
  27. /*DEFINES*/
  28. #define file "BAdmin/Profiles/%s.ini"
  29. #define WELCOME 0
  30. #define LOGIN 1
  31.  
  32. public OnFilterScriptInit()
  33. {
  34.     print("\n--------------------------------------");
  35.     print(" Badmin is loading...");
  36.     print("--------------------------------------\n");
  37.     return 1;
  38. }
  39.  
  40. public OnFilterScriptExit()
  41. {
  42.     print("\n--------------------------------------");
  43.     print(" Badmin is unloading...");
  44.     print("--------------------------------------\n");
  45.     return 1;
  46. }
  47.  
  48. public OnPlayerConnect(playerid)
  49. {   PInfo[playerid][level] = 0;
  50.     PInfo[playerid][vip] = 0;
  51.     PInfo[playerid][score] = 0;
  52.     PInfo[playerid][coins] = 0;
  53.     PInfo[playerid][cash] = 0;
  54.     if(!fexist(file)) {ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"Register","Te rugam sa te inregistrezi mai jos","Register","Kick");SendClientMessage(playerid,0x66FF00FF,"Bine ai venit pe GTA.Know.RO!Te rugam sa te inregistrezi mai jos!");}
  55.     if(fexist(file)) {ShowPlayerDialog(playerid,1,DIALOG_STYLE_INPUT,"Login","Te rugam sa te loghezi mai jos!","Login","Kick");SendClientMessage(playerid,0x66FF00FF,"Bine ai revenit!Te rugam sa te loghezi mai jos!");}
  56.     return 1;
  57. }
  58.  
  59. public OnPlayerDisconnect(playerid, reason)
  60. {
  61.     return 1;
  62. }
  63.  
  64. public OnPlayerSpawn(playerid)
  65. {
  66.     return 1;
  67. }
  68.  
  69. public OnPlayerDeath(playerid, killerid, reason)
  70. {
  71.     return 1;
  72. }
  73.  
  74. public OnVehicleSpawn(vehicleid)
  75. {
  76.     return 1;
  77. }
  78.  
  79. public OnVehicleDeath(vehicleid, killerid)
  80. {
  81.     return 1;
  82. }
  83.  
  84. public OnPlayerText(playerid, text[])
  85. {
  86.     return 1;
  87. }
  88.  
  89. public OnPlayerCommandText(playerid, cmdtext[])
  90. {
  91.     if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  92.     {
  93.         // Do something here
  94.         return 1;
  95.     }
  96.     return 0;
  97. }
  98.  
  99. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  100. {
  101.     return 1;
  102. }
  103.  
  104. public OnPlayerExitVehicle(playerid, vehicleid)
  105. {
  106.     return 1;
  107. }
  108.  
  109. public OnPlayerStateChange(playerid, newstate, oldstate)
  110. {
  111.     return 1;
  112. }
  113.  
  114. public OnPlayerEnterCheckpoint(playerid)
  115. {
  116.     return 1;
  117. }
  118.  
  119. public OnPlayerLeaveCheckpoint(playerid)
  120. {
  121.     return 1;
  122. }
  123.  
  124. public OnPlayerEnterRaceCheckpoint(playerid)
  125. {
  126.     return 1;
  127. }
  128.  
  129. public OnPlayerLeaveRaceCheckpoint(playerid)
  130. {
  131.     return 1;
  132. }
  133.  
  134. public OnRconCommand(cmd[])
  135. {
  136.     return 1;
  137. }
  138.  
  139. public OnPlayerRequestSpawn(playerid)
  140. {
  141.     return 1;
  142. }
  143.  
  144. public OnObjectMoved(objectid)
  145. {
  146.     return 1;
  147. }
  148.  
  149. public OnPlayerObjectMoved(playerid, objectid)
  150. {
  151.     return 1;
  152. }
  153.  
  154. public OnPlayerPickUpPickup(playerid, pickupid)
  155. {
  156.     return 1;
  157. }
  158.  
  159. public OnVehicleMod(playerid, vehicleid, componentid)
  160. {
  161.     return 1;
  162. }
  163.  
  164. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  165. {
  166.     return 1;
  167. }
  168.  
  169. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  170. {
  171.     return 1;
  172. }
  173.  
  174. public OnPlayerSelectedMenuRow(playerid, row)
  175. {
  176.     return 1;
  177. }
  178.  
  179. public OnPlayerExitedMenu(playerid)
  180. {
  181.     return 1;
  182. }
  183.  
  184. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  185. {
  186.     return 1;
  187. }
  188.  
  189. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  190. {
  191.     return 1;
  192. }
  193.  
  194. public OnRconLoginAttempt(ip[], password[], success)
  195. {
  196.     return 1;
  197. }
  198.  
  199. public OnPlayerUpdate(playerid)
  200. {
  201.     return 1;
  202. }
  203.  
  204. public OnPlayerStreamIn(playerid, forplayerid)
  205. {
  206.     return 1;
  207. }
  208.  
  209. public OnPlayerStreamOut(playerid, forplayerid)
  210. {
  211.     return 1;
  212. }
  213.  
  214. public OnVehicleStreamIn(vehicleid, forplayerid)
  215. {
  216.     return 1;
  217. }
  218.  
  219. public OnVehicleStreamOut(vehicleid, forplayerid)
  220. {
  221.     return 1;
  222. }
  223.  
  224. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  225. {
  226.     if(dialogid == 0)
  227.     {
  228.     if(response)
  229.     {
  230.     new password = inputtext[128];
  231.     new string[128];
  232.     INI_Open(file);
  233.     INI_WriteString(file,"Parola",password);
  234.     new pName[MAX_PLAYER_NAME];
  235.     GetPlayerName(playerid,"pName",sizeof(pName));
  236.     INI_WriteString(file,"Nume",pName);
  237.     INI_WriteInt("Level",PInfo[playerid][level]);
  238.     INI_WriteInt("Cash",PInfo[playerid][cash]);
  239.     INI_WriteInt("Coins",PInfo[playerid][coins]);
  240.     INI_WriteInt("Score",PInfo[playerid][score]);
  241.     SendClientMessage(playerid,0x66FF00FF,"Te-ai inregistrat cu succes!!!");
  242.     format(string,128,"Te-ai inregistrat cu succes %s cu parola %s !!!",pName,password);
  243.     SendClientMessage(playerid,0x66FF00FF,string);
  244.     }
  245.     else
  246.     {
  247.     SendClientMessage(playerid,0xFF0000FF,"Nu te-ai inregistrat!Ai primit KICK!!!");
  248.     Kick(playerid);
  249.     }
  250.     }
  251.     if(dialogid == 1)
  252.     {
  253.     if(!response)
  254.     {
  255.     SendClientMessage(playerid,0xFF0000FF,"Nu te-ai logat!Vei primi KICK!!!");
  256.     Kick(playerid);
  257.     }
  258.     else
  259.     {
  260.     INI_Open(file);
  261.     new password2[128];
  262.     INI_ReadString("Parola",password2);
  263.     if(!strcmp(password2, inputtext))
  264.     {
  265.     SendClientMessage(playerid,0xFF0000FF,"Parola introdusa este gresita!");
  266.     INI_Close();
  267.     }
  268.     PInfo[playerid][level] = INI_ReadInt("Level");
  269.     PInfo[playerid][cash] =  INI_ReadInt("Cash");
  270.     PInfo[playerid][coins] = INI_ReadInt("Coins");
  271.     PInfo[playerid][score] = INI_ReadInt("Score");
  272.     }
  273.     }
  274.     return 1;
  275. }
  276.  
  277. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  278. {
  279.     return 1;
  280. }
Advertisement
Add Comment
Please, Sign In to add comment