04.03.2016, 08:54
Hi, Im just written a gangzone filterscrpit and complie it correctly.
But callback OnPlayerSpawn() doesnt work when I was spwaned.
So I decide to test it with print("test");
OnPlayerSpawn() in GameMode give me a response but not in FS.
I also put SetSpawnInfo() in gamemode, and it still not work..
I will show you the code.
But callback OnPlayerSpawn() doesnt work when I was spwaned.
So I decide to test it with print("test");
OnPlayerSpawn() in GameMode give me a response but not in FS.
I also put SetSpawnInfo() in gamemode, and it still not work..
I will show you the code.
Код:
#include <a_samp> #include "../includes/colors.inc" enum E_ZONE { Float:MINX, Float:MINY, Float:MAXX, Float:MAXY, COLOR } static const zones[][E_ZONE] = { {151.0, -2536.0, 861.0, -2136.0, COLOR_BLUE }, // "Deep Ocean" {1065.0, -1392.0, 1265.0, -1282.0, COLOR_LIGHT_RED}, // "All saint Hospital" {1992.0, -1449.0, 2057.0, -1350.0, COLOR_LIGHT_RED}, // "Couty(big)" {2056.0, -1450.0, 2102.0, -1390.0, COLOR_LIGHT_RED} // "Couty(small)" }; static zoneid[sizeof zones]; public OnFilterScriptInit() { for(new i; i< sizeof zones; i ++) { zoneid[i] = GangZoneCreate( zones[i][MINX], zones[i][MINY], zones[i][MAXX], zones[i][MAXY] ); } printf("** [SETUP] Zones system has been setup, load %d zones.", sizeof zones); return 1; } public OnPlayerConnect(playerid) { return 1; } public OnPlayerSpawn(playerid) { for(new i; i< sizeof zones; i ++) { GangZoneShowForPlayer(playerid, zoneid[i], zones[i][COLOR]); } return 1; }