krishhna

hide

May 17th, 2020
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. public hideme(playerid)
  2. {
  3. for(new i = 0; i < MAX_PLAYERS; i++)
  4. {
  5. if(gTeam[playerid] == TEAM_GREEN)
  6. {
  7. SetPlayerMarkerForPlayer(i, playerid, 0x33AA3300); // green color invisible
  8. }
  9. if(gTeam[playerid] == TEAM_BLUE)
  10. {
  11. SetPlayerMarkerForPlayer(i, playerid, 0x0072E600); // blue color invisible
  12. }
  13. }
  14. return 1;
  15. }
  16. forward hideme(playerid);
  17.  
  18. public OnPlayerSpawn(playerid)
  19. {
  20. // at color setting
  21. if(hidemeused[playerid] == true)
  22. {
  23. hideme(playerid);
  24. }
  25. else
  26. {
  27. SetPlayerColorAccordingTeam(playerid); // or what ever u use for setting player color
  28. }
  29. return 1;
  30. }
  31.  
  32. SetPlayerColorAccordingTeam(playerid)
  33. {
  34. if(gTeam[playerid] == TEAM_GREEN)
  35. {
  36. SetPlayerColor(playerid,0x33AA33FF);
  37. }
  38. if(gTeam[playerid] == TEAM_BLUE)
  39. {
  40. SetPlayerColor(playerid,0x0072E60FF);
  41. }
  42. }
Add Comment
Please, Sign In to add comment