Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- new GangZoneID[56];
- new Float:GangZoneMinX[56];
- new Float:GangZoneMinY[56];
- new Float:GangZoneMaxX[56];
- new Float:GangZoneMaxY[56];
- //==============================================|
- stock CreateGangZone(id, Float:minx, Float:miny, Float:maxx, Float:maxy)//Stock??
- {
- global GangZoneID, GangZoneMinX, GangZoneMaxX, GangZoneMinY, GangZoneMaxY;
- GangZoneID[id] = GangZoneCreate(minx, miny, maxx, maxy);
- GangZoneMinX[id] = minx;
- GangZoneMinY[id] = miny;
- GangZoneMaxX[id] = maxx;
- GangZoneMaxY[id] = maxy;
- return 0;
- }
- //==============================================|
- //Vytvořil jsem si stock, který mi zjišťuje zda se hráč nachází v gang-zóně. Bohužel ačkoliv je hráč uvnitř zóny stále vrací hodnotu 0.
- stock IsPlayerInGangZone(playerid)
- {
- global GangZoneID, GangZoneMinX, GangZoneMaxX, GangZoneMinY, GangZoneMaxY;
- new Float:X, Float:Y, Float:Z;
- GetPlayerPos(playerid, X, Y, Z);
- for(new id = 1; id < 56; id++)
- {
- if(X >= GangZoneMinX[id] && X <= GangZoneMaxX[id] && Y >= GangZoneMinY[id] && Y <= GangZoneMaxY[id])
- {
- return 1;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement