Turfs (formerly gangzones) module
Zdravo! Upravo sam završio našu Turf implementaciju na server i mislio sam da objavim pregled ovog modula i da pokažem da nismo odustali ili bilo šta!
// Creates a Turf. A playerid can be passed in order to make it a player turf.
native Turf:Turf_Create(Float:minx, Float:miny, Float:maxx, Float:maxy, Player: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:turf, colour, Player: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:turf, Player: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:turf, colour, Player: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:turf, Player:playerid = INVALID_PLAYER_ID);
Ovo se očito razlikuje od tradicionalnog API-ja, ali ne brinite, postojat će omoti za ovu vrstu stvari kako bi se osiguralo da se normalna skripta može ponovo kompajlirati bez problema i bez izmjena.
Još jedna važna činjenica koju biste možda željeli znati je da je svaki travnjak u istom bazenu i da postoji maksimalno 4,294,967,295 travnjaka koje treba kreirati iz skripte. Međutim, klijent može rukovati samo sa 1024 travnjaka odjednom.