Guest User

user script with YSI

a guest
Aug 30th, 2014
323
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. #define PP_WP
  2. #define MODE_NAME "MyMode"
  3.  
  4. native WP_Hash(buffer[], len, const str[]);
  5.  
  6. #include <YSI\y_commands>
  7. #include <YSI\y_users>
  8. #include <YSI\y_uvar>
  9. #include <YSI\y_extra>
  10. #include <YSI\y_text>
  11.  
  12. enum E_PLAYER_DATA
  13. {
  14. E_PLAYER_SKIN,
  15. Float:E_PLAYER_HEALTH
  16. }
  17. uvar gPlayerData[MAX_PLAYERS][E_PLAYER_DATA];
  18.  
  19. loadtext mode[messages];
  20. public OnGameModeInit()
  21. {
  22. Langs_Add("EN", "English");
  23. return 1;
  24. }
  25.  
  26. public OnPlayerLogin(playerid, uid)
  27. {
  28. Text_Send(playerid, $WELCOME_BACK);
  29. SetPlayerSkin(playerid, gPlayerData[playerid][E_PLAYER_SKIN]);
  30. SetPlayerHealth(playerid, gPlayerData[playerid][E_PLAYER_HEALTH]);
  31. }
  32.  
  33. public OnPlayerLogout(playerid, uid)
  34. {
  35. gPlayerData[playerid][E_PLAYER_SKIN] = GetPlayerSkin(playerid);
  36. GetPlayerHealth(playerid, gPlayerData[playerid][E_PLAYER_HEALTH]);
  37. }
Advertisement
Add Comment
Please, Sign In to add comment