Advertisement
Guest User

Untitled

a guest
Sep 25th, 2010
1,406
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.87 KB | None | 0 0
  1.  
  2.  
  3. #include <a_samp>
  4. #include <dini> //Include
  5. new Vip[MAX_PLAYERS]; // Variavel
  6.  
  7.  
  8. public OnGameModeInit()
  9. {
  10. if(!fexist("vip.ini")) dini_Create("vip.ini");
  11. return 0;
  12. }
  13.  
  14. public OnPlayerConnect(playerid)
  15. {
  16. if(dini_Isset("vip.ini",PlayerName(playerid))) (Vip[playerid] = dini_Int("vip.ini",PlayerName(playerid)));
  17.  
  18.     return 1;
  19. }
  20.  
  21. public OnPlayerDisconnect(playerid, reason)
  22. {
  23. dini_IntSet("vip.ini",PlayerName(playerid),Vip[playerid]);
  24.  
  25.     return 1;
  26. }
  27.  
  28.  
  29. public OnPlayerCommandText(playerid, cmdtext[])
  30. {
  31.     if (strcmp("/eu", cmdtext, true, 10) == 0)
  32.     {
  33.     if(Vip[playerid] > 1)
  34.     {
  35.         GivePlayerMoney(playerid,50000);
  36.     }else{
  37.         SendClientMessage(playerid,0x0000BBAA,"Lamento Você não e VIP :S");
  38.     }
  39.     return 1;
  40.     }
  41.     return 0;
  42. }
  43.  
  44.  
  45. stock PlayerName(playerid) {
  46. new PlayerName[MAX_PLAYERS];
  47. GetPlayerName(playerid, PlayerName, MAX_PLAYERS);
  48. return PlayerName;
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement