Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new ZonaAdmins;
- enum Data{
- Level
- }
- new PlayerInfo[MAX_PLAYERS][Data];
- public OnFilterScriptInit()
- {
- ZonaAdmins = GangZoneCreate(1249.533, -2942.825, 1634.903, -2650.878);
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- GangZoneShowForPlayer(playerid, ZonaAdmins, 0xFF000083);
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- if(IsPlayerInArea(playerid,1249.533,1634.903,-2942.825,-2650.878) == true)
- {
- if(PlayerInfo[playerid][Level] <= 1)
- {
- SetPlayerHealth(playerid,0.0);
- }
- }
- return 1;
- }
- IsPlayerInArea(playerid, Float:minx, Float:maxx, Float:miny, Float:maxy)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- if (x > minx && x < maxx && y > miny && y < maxy) return 1;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment