14.10.2011, 14:47
Код:
#define GZ_COR_PADRAO 0xffffff49 #define MAX_GZS 2 new Float:gzsChecks[MAX_GZS][4] = { {-72.7639,2476.5984, 436.3150,2526.0474}, // GangZona Aeroporto Abandonado {1176.9095,1223.9652, 1038.0834,1362.3284} // GangZona AutoEscola LV }; new gzsNames[MAX_GZS][28] = { "Aeroporto Abandonado LV", "Auto-Escola LV" }; forward checkGz(); public checkGz() { new string[128]; for(new i = 0; i < MAX_PLAYERS; i++) { for(new h = 0; h < MAX_GZS; i++) { if(IsPlayerInArea(i, gzsChecks[h][0],gzsChecks[h][1],gzsChecks[h][2],gzsChecks[h][3])) { format(string,sizeof(string),"%s",gzsNames[h]); SendClientMessage(i,0xffff5494,string); } } } return 1; } new gzsteste[2]; // Mode init for(new h =0; h < MAX_GZS; h++) { gzsteste[h] = GangZoneCreate(gzsChecks[h][0],gzsChecks[h][1],gzsChecks[h][2],gzsChecks[h][3]); } SetTimer("checkGz", 1000, true); // Onplayerspawn for(new i =0; i < MAX_GZS; i++) { GangZoneShowForAll(gzsteste[i], GZ_COR_PADRAO); }