open.mp forum
Turfs (formerly gangzones) module - Printable Version

+ open.mp forum (https://forum.open.mp)
-- Forum: open.mp (https://forum.open.mp/forumdisplay.php?fid=40)
--- Forum: Development Updates (https://forum.open.mp/forumdisplay.php?fid=43)
--- Thread: Turfs (formerly gangzones) module (/showthread.php?tid=826)



Turfs (formerly gangzones) module - Josh - 2019-10-19

Hello!



I have just finished our Turf implementation into the server and I thought of posting a overview of this module and to show we haven't quit or anything!



PHP Code:
// Creates a Turf. A playerid can be passed in order to make it a player turf.

native Turf:Turf_Create(Float:minxFloat:minyFloat:maxxFloat:maxyPlayer:owner INVALID_PLAYER_ID);



// Destroys a turf.

native Turf_Destroy(Turf:turf);



// Shows a Turf to a player or players.

// Will send to all players if playerid = INVALID_PLAYER_ID.

native Turf_Show(Turf:turfcolourPlayer:playerid INVALID_PLAYER_ID);



// Hides a Turf from a player or players.

// Will send to all players if playerid = INVALID_PLAYER_ID.

native Turf_Hide(Turf:turfPlayer:playerid INVALID_PLAYER_ID);



// Flashes a Turf for a player or players.

// Will send to all players if ?playerid = INVALID_PLAYER_ID.

native Turf_Flash(Turf:turfcolourPlayer:playerid INVALID_PLAYER_ID);



// Stops a Turf from flashing for player(s).

// Will send to all players if playerid = INVALID_PLAYER_ID.

native Turf_StopFlashing(Turf:turfPlayer:playerid INVALID_PLAYER_ID); 



This is obviously different from the traditional API, but not to worry, there will be wrappers in place for this kind of stuff to make sure a normal script can be recompiled with no issues and without edits.

Another important fact that you may want to know is that every turf is in the same pool and there's a maximum of 4,294,967,295 turfs to be created from the script.

However, the client can only handle 1024 turfs at one time.


RE: Turfs (formerly gangzones) module - TommyB - 2019-10-19

lovely !


RE: Turfs (formerly gangzones) module - spacemud - 2019-10-19

NICE release REPﯯ!!!!!!


RE: Turfs (formerly gangzones) module - iAmir - 2019-10-19

gangzones > turfs

sorry bro -REP


RE: Turfs (formerly gangzones) module - Southclaws - 2019-10-19

josh deleted my gangzone code so im not friends with him any more


RE: Turfs (formerly gangzones) module - BigETI - 2019-10-19

Uses inf pool






RE: Turfs (formerly gangzones) module - Josh - 2019-10-19

(2019-10-19, 07:52 PM)Southclaws Wrote: josh deleted my gangzone code so im not friends with him any more



You've had long enough to complete it!


RE: Turfs (formerly gangzones) module - nize - 2019-10-20

so sexi, this thread made me quit nofap


RE: Turfs (formerly gangzones) module - Caledonite - 2019-10-20

lovely, can't wait to see more!!!!!!


RE: Turfs (formerly gangzones) module - Nutter - 2019-10-20

approved, great to see progress


RE: Turfs (formerly gangzones) module - BloodMaster - 2019-10-27

It would be good to have something like OnPlayerEnter/LeaveTurf aswell


RE: Turfs (formerly gangzones) module - Tama - 2019-10-29

(2019-10-27, 09:52 PM)BloodMaster Wrote: It would be good to have something like OnPlayerEnter/LeaveTurf aswell


Yeah something like this
PHP Code:
forward OnPlayerEnterTurf(playeridTurf:turf);
forward OnPlayerLeaveTurf(playeridTurf:turf); 



RE: Turfs (formerly gangzones) module - Standal - 2019-10-30

wonderfully beautiful!


RE: Turfs (formerly gangzones) module - Sasino97 - 2019-11-03

Good job