MrConso99

Errore Pawno

Nov 7th, 2011
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.82 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new ZonaAdmins;
  4.  
  5. enum Data{
  6. Level
  7. }
  8.  
  9. new PlayerInfo[MAX_PLAYERS][Data];
  10.  
  11. public OnFilterScriptInit()
  12. {
  13.     ZonaAdmins = GangZoneCreate(1249.533, -2942.825, 1634.903, -2650.878);
  14.     return 1;
  15. }
  16.  
  17. public OnFilterScriptExit()
  18. {
  19.     return 1;
  20. }
  21.  
  22. public OnPlayerSpawn(playerid)
  23. {
  24.     GangZoneShowForPlayer(playerid, ZonaAdmins, 0xFF000083);
  25.     return 1;
  26. }
  27.  
  28. public OnPlayerUpdate(playerid)
  29. {
  30.     if(IsPlayerInArea(playerid,1249.533,1634.903,-2942.825,-2650.878) == true)
  31.     {
  32.     if(PlayerInfo[playerid][Level] <= 1)
  33.     {
  34.     SetPlayerHealth(playerid,0.0);
  35.     }
  36.     }
  37.     return 1;
  38. }
  39.  
  40.  
  41. IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
  42. {
  43.     new Float:x, Float:y, Float:z;
  44.     GetPlayerPos(playerid, x, y, z);
  45.     if (x > minx && x < maxx && y > miny && y < maxy) return 1;
  46.     return 0;
  47. }
  48.  
Advertisement
Add Comment
Please, Sign In to add comment