Advertisement
Guest User

set

a guest
Apr 23rd, 2010
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.06 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //#define FILTERSCRIPT
  4.  
  5. #include <a_samp>
  6. #include <Dini>
  7.  
  8.  
  9. #if defined FILTERSCRIPT
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     if(!fexist("score.ini")) dini_Create("score.ini");
  14.     if(!fexist("Weapon.ini")) dini_Create("Weapon.ini");
  15.     return 1;
  16. }
  17.  
  18. public OnFilterScriptExit()
  19. {
  20.     return 1;
  21. }
  22.  
  23. #else
  24.  
  25. main()
  26. {
  27.  
  28. }
  29.  
  30. #endif
  31.  
  32. public OnPlayerConnect(playerid)
  33. {
  34.     if(dini_Isset("Weapon.ini",PlayerName(playerid))) GivePlayerWeapon(playerid,dini_Int("Weapon.ini",PlayerName(playerid)));
  35.     if(dini_Isset("score.ini",PlayerName(playerid))) SetPlayerScore(playerid,dini_Int("score.ini",PlayerName(playerid)));
  36.     return 1;
  37. }
  38.  
  39. public OnPlayerDisconnect(playerid, reason)
  40. {
  41.     dini_IntSet("score.ini",PlayerName(playerid),GetPlayerScore(playerid));
  42.     dini_IntSet("Weapon.ini",PlayerName(playerid),GetPlayerWeapon(playerid));
  43.     return 1;
  44. }
  45.  
  46. PlayerName(playerid) {
  47. new PlayerName[MAX_PLAYERS];//linha 46
  48. GetPlayerName(playerid, PlayerName, MAX_PLAYERS);//linha 47
  49. return PlayerName;
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement