/* ^eXe24^LV×SF×LS™
================================================================================
Map By Gamer_Z & L4nCeR
Copyright (c) 2009-2010 www.exe24.info
All Rights Reserved.
SAMP 0.3b
================================================================================
CREDITS:
- LUBY & SEBOS --- SOME FUNCTIONS
Pomoc Przy Mapie: MKQ_ & MV400R
================================================================================
*/
#pragma dynamic 50000000
#define forum "www.polski-gold.xaa.pl"
#define wersja "8.31"
#define build "3011"
#define update "13-11-2010"
#define mapname "^eXe24^LV×SF×LS™ "wersja" Build:"build""
#define mapname2 "eXe24 LV+SF+LS DM 24/7"
#define ModeONE "^eXe24^LV×SF×LS™ "wersja""
#define ModeTWO "!eXe24! DeathMatch Mode V"wersja""
#define ModeTHREE "!eXe24! Mode v"wersja" build:"build""
#define MapONE "Polskie Party 24/7"
#define MapTWO "Zapraszamy!"
#define MapTHREE "DeathMatch 24/7"
#define waga_pwn "2430"
#define waga_amx "1931"
#define ilosc_linijek "52175"
#define FLOAT_INFINITY (Float:0x7F800000)
#define FLOAT_NEG_INFINITY (Float:0xFF800000)
#define FLOAT_NAN (Float:0xFFFFFFFF)
#define isnull(%1) \
((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#define REGULAMIN 489
#define LOGREGDLG 972
#define MAX_LUDZI_W_MAFIA 10// a kiedys bylo 40...
#define HidePlayerDialog(%1) ShowPlayerDialog(%1,-1,0,"","","","")
#define SuperMenu 8943
#define UZYJ_PEK
#define WARWORLD 33
//#define SD //Debuger
/**************************** Obiekty/Eventy/WG... ****************************/
#define UZYJ_MIDO // Obiekty (streamer)
#if defined UZYJ_MIDO
new globalobjects;
#define UZYJ_SIANKO // WG/Arena Siana
#define UZYJ_LOTNISKO // Lotnisko Gamera Pod Mostem SF
#define UZYJ_BOMBA // Bomba Mod
#define UZYJ_OFFROAD // Tor Offroad'owy
#define UZYJ_SPAR // Spar Arena
#define UZYJ_AA // Atlanta City
#define UZYJ_MT // Montgomery
#define UZYJ_EXEBASE // Baza Adminów eXe24
#define UZYJ_RING // Ring Bokserski
#define UZYJ_ELPASSO // Miasto El Passo
#define UZYJ_PARKOURTOR // Parkour Event
#define UZYJ_PB1 // baza graczy1
#define UZYJ_TG // tor gamera
#define UZYJ_DRIFTING // tor drifitng
#define UZYJ_LEPSZELV // ulepszone lv
#define UZYJ_MA // monster arena
#define UZYJ_ATLANTIS // podwodne miasto atlantis
#define UZYJ_STUNT // StuntPark kolo LS by L4nCeR & mkq
#define UZYJ_FIGHTERZ // Baza FighterZ :D
#define UZYJ_AKMAFIA // mini Baza AK :D
#define UZYJ_SA // Miasto San Antonio (liberty city) By L4nCeR 1k obiektów!
#define UZYJ_WYSKOK // Nowy Wyskok by L4nCeR
#define UZYJ_MW // Mega Wyskok by L4nCeR
#define UZYJ_L4nCeRxd // napis L4nCeR w LV :P
#define UZYJ_DH // oswietlone drift hill
#define UZYJ_RPG // arena rpg w wojsku
#define UZYJ_LANCERTOR // tor L4nCeRa
#define UZYJ_WALKIULICZNE //Walki uliczne by MV
#define UZYJ_OBIEKTYWG //Obiekty na WG by MV
#define UZYJ_WOJNA_MORSKA //obiekty wojny morskiej
#define UZYJ_LABIRYNT //Labirynt by PlayBoy_
#define UZYJ_LABIRYNT_WALK //Labirynt by PoluS
#define UZYJ_DWIEWIEZE //Walka l¹dowo - morska
#define UZYJ_SANCHEZ // Tor sanchez'ów by Polus
/**************************** Inne Funkcje/Skrypty ****************************/
#define UZYJ_AUTO_RESTART
#define godzina_restartu 3
#define minuta_restartu 0
//restart serwera o godzine 3:00
#define UZYJ_NEWSSBASE// Baza mafii S-SKILLS - NIE DO KUPIENIA! JUZ DOSC KURWA TYCH BAZ
#define UZYJ_SSWARLODZ//Tak samo baza SS!!! to samo co gorna...
#define UZYJ_WWII // U¿yj WarWorld
#define UZYJ_LOCK // Zamykanie pojazdów
#define UZYJ_REGULAMIN // Regulamin w GUI
#define UZYJ_NOWYLOGINSYSTEM // Nowy Login System
#define UZYJ_HOSTBAN // Ban Na Hosta
#define UZYJ_LOTTO // Lotto System
#define UZYJ_KATANA // 5up3r k4t4n4 r4pik3 xD
#define UZYJ_SPS // Antycheat!
#define UZYJ_NANIM // Nowe Animacje
#define UZYJ_VOTE // G³osowanie
#define UZYJ_GPS // GPS (namierzanie graczy)
#pragma unused InvisibleColors
#define UZYJ_MAFIA // Mafia System by Luby
#define UZYJ_BANCZASOWY // Ban czasowy
#define UZYJ_FLASHLIGHTS //Migaj¹ce œwiat³a ;D
//#define UZYJ_HYDRABOMB // Bombki Hydry ;]
//#define UZYJ_MAPSYSTEM // Map System
/****************************** Bazy Graczy/Mafii *****************************/
#define UZYJ_MILITARY
#define UZYJ_EPSON
#define UZYJ_SAMPO
#define UZYJ_PODZIEMIE
#define UZYJ_SAS
#define UZYJ_XEROX
#define UZYJ_MOTEL
#define UZYJ_NAKATA
#define UZYJ_TRIDENT
#define UZYJ_GAS
#define UZYJ_PAWN
#define UZYJ_SWAT
#define UZYJ_SAS2
#define UZYJ_ACER
#define UZYJ_FEAR
#define UZYJ_PHOENIX
#define UZYJ_GRAVIS
#define UZYJ_MAXTOR
#define UZYJ_DYSAN
#define UZYJ_BIOSTAR
#define UZYJ_TRACER
#define UZYJ_DELTA
#define UZYJ_WENTO
#define UZYJ_AREA51BASE
#define UZYJ_EROTIC
#define UZYJ_Quad
#define UZYJ_TYSKIE
#define UZYJ_CRYSTAL
#define UZYJ_CMENTARZ
#define UZYJ_BAZAMEGASS
#define UZYJ_EROTIC2
#define UZYJ_TopGun
#define UZYJ_MARIAN
#define FILE_BASEOWNERS "_baseowners.ini"
#define UZYJ_PICKUPYBAZ // Pickupy Przed Bazami Graczy
/******************************************************************************/
#endif
#define FILE_BLACKLIST "blacklist.ini"
#define all_cmds_log "komendy"
#define all_chat "chat"
#define all_joins "joins"
#define PMS "PrivateMessages"
#define log_kills "Zabicia"
#define adminloginlog "adminlogins"
#define kickslog "kicks"
#define banslog "bans"
#define playercrashlog "left_crash"
#define playerleftlog "left_normal"
#define playerkickbanlog "left_kickban"
#define banczasowylog "cbanslog"
// WA¯NE NIE WYWALAÆ!
#define SetCmdCost(%1) if(CheckCostAndCash(playerid,%1,cmd))return 1
#define ToLog(%1,%2) \
new intolog[256];\
format(intolog, 256, %2);\
SaveLog(%1, intolog)
#define ToLog2(%1,%2) \
new intolog2[256];\
format(intolog2, 256, %2);\
SaveLog(%1, intolog2)
#define BazaNieDlaCiebieCheck(%1,%2,%3)\
if(%3 == 1){\
if(!IsPlayerInMafia(PlayerName(%1),%2) && !IsHead(%1))return SendClientMessage(%1, CWARN, "Nie mo¿esz u¿yæ tej komendy.");\
}else{\
if(strcmp(udb_encode(PlayerName(%1)),udb_encode(%2),false) && !IsHead(%1))return SendClientMessage(%1, CWARN, "Nie mo¿esz u¿yæ tej komendy.");\
}
#define BazaNieDlaCiebieCheckd(%1,%2,%3,%4)\
if(%3 == 1){\
if(!IsPlayerInMafia(PlayerName(%1),%2) && !IsPlayerInMafia(PlayerName(%1),%4) && !IsHead(%1))return SendClientMessage(%1, CWARN, "Nie mo¿esz u¿yæ tej komendy.");\
}else{\
if(strcmp(udb_encode(PlayerName(%1)),udb_encode(%2),false) && strcmp(udb_encode(PlayerName(%1)),udb_encode(%4),false) && !IsHead(%1))return SendClientMessage(%1, CWARN, "Nie mo¿esz u¿yæ tej komendy.");\
}
#define DRIFT_MINKAT 10.0
#define DRIFT_MAXKAT 90.0
#define DRIFT_SPEED 30.0
#define randomcolor ColorsAlpha77[random(sizeof(ColorsAlpha77))]
#pragma tabsize 4
#pragma rational Float
#define SPECIAL_ACTION_NONE 0
#define SPECIAL_ACTION_DUCK 1
#define SPECIAL_ACTION_USEJETPACK 2
#define SPECIAL_ACTION_ENTER_VEHICLE 3
#define SPECIAL_ACTION_EXIT_VEHICLE 4
#define SPECIAL_ACTION_DANCE1 5
#define SPECIAL_ACTION_DANCE2 6
#define SPECIAL_ACTION_DANCE3 7
#define SPECIAL_ACTION_DANCE4 8
#define SPECIAL_ACTION_HANDSUP 10
#define SPECIAL_ACTION_USECELLPHONE 11
#define SPECIAL_ACTION_SITTING 12
#define SPECIAL_ACTION_STOPUSECELLPHONE 13
#define SPECIAL_ACTION_DRINK_BEER 20
#define SPECIAL_ACTION_SMOKE_CIGGY 21
#define SPECIAL_ACTION_DRINK_WINE 22
#define SPECIAL_ACTION_DRINK_SPRUNK 23
#define FIGHT_STYLE_NORMAL 4
#define FIGHT_STYLE_BOXING 5
#define FIGHT_STYLE_KUNGFU 6
#define FIGHT_STYLE_KNEEHEAD 7
#define FIGHT_STYLE_GRABKICK 15
#define FIGHT_STYLE_ELBOW 16
#define WEAPONSKILL_PISTOL 0
#define WEAPONSKILL_PISTOL_SILENCED 1
#define WEAPONSKILL_DESERT_EAGLE 2
#define WEAPONSKILL_SHOTGUN 3
#define WEAPONSKILL_SAWNOFF_SHOTGUN 4
#define WEAPONSKILL_SPAS12_SHOTGUN 5
#define WEAPONSKILL_MICRO_UZI 6
#define WEAPONSKILL_MP5 7
#define WEAPONSKILL_AK47 8
#define WEAPONSKILL_M4 9
#define WEAPONSKILL_SNIPERRIFLE 10
#define MAX_CHATBUBBLE_LENGTH 144
#define SPECTATE_MODE_NORMAL 1
#define SPECTATE_MODE_FIXED 2
#define SPECTATE_MODE_SIDE 3
#define PLAYER_RECORDING_TYPE_NONE 0
#define PLAYER_RECORDING_TYPE_DRIVER 1
#define PLAYER_RECORDING_TYPE_ONFOOT 2
#define CARMODTYPE_SPOILER 0
#define CARMODTYPE_HOOD 1
#define CARMODTYPE_ROOF 2
#define CARMODTYPE_SIDESKIRT 3
#define CARMODTYPE_LAMPS 4
#define CARMODTYPE_NITRO 5
#define CARMODTYPE_EXHAUST 6
#define CARMODTYPE_WHEELS 7
#define CARMODTYPE_STEREO 8
#define CARMODTYPE_HYDRAULICS 9
#define CARMODTYPE_FRONT_BUMPER 10
#define CARMODTYPE_REAR_BUMPER 11
#define CARMODTYPE_VENT_RIGHT 12
#define CARMODTYPE_VENT_LEFT 13
#define MAX_PLAYER_NAME (24)
#define MAX_PLAYERS (81)
#define MAX_VEHICLES (2000)
#define INVALID_PLAYER_ID (0xFFFF)
#define INVALID_VEHICLE_ID (0xFFFF)
#define NO_TEAM (255)
#define MAX_OBJECTS (400)
#define INVALID_OBJECT_ID (0xFFFF)
#define MAX_GANG_ZONES (1024)
#define MAX_TEXT_DRAWS (2048)
#define MAX_MENUS (128)
#define MAX_3DTEXT_GLOBAL (1024)
#define MAX_3DTEXT_PLAYER (1024)
#define MAX_PICKUPS (2048)
#define INVALID_MENU (0xFF)
#define INVALID_TEXT_DRAW (0xFFFF)
#define INVALID_GANG_ZONE (-1)
#define INVALID_3DTEXT_ID (0xFFFF)
#define DIALOG_STYLE_MSGBOX 0
#define DIALOG_STYLE_INPUT 1
#define DIALOG_STYLE_LIST 2
#define PLAYER_STATE_NONE (0)
#define PLAYER_STATE_ONFOOT (1)
#define PLAYER_STATE_DRIVER (2)
#define PLAYER_STATE_PASSENGER (3)
#define PLAYER_STATE_EXIT_VEHICLE (4)
#define PLAYER_STATE_ENTER_VEHICLE_DRIVER (5)
#define PLAYER_STATE_ENTER_VEHICLE_PASSENGER (6)
#define PLAYER_STATE_WASTED (7)
#define PLAYER_STATE_SPAWNED (8)
#define PLAYER_STATE_SPECTATING (9)
#define PLAYER_MARKERS_MODE_OFF (0)
#define PLAYER_MARKERS_MODE_GLOBAL (1)
#define PLAYER_MARKERS_MODE_STREAMED (2)
#define WEAPON_BRASSKNUCKLE (1)
#define WEAPON_GOLFCLUB (2)
#define WEAPON_NITESTICK (3)
#define WEAPON_KNIFE (4)
#define WEAPON_BAT (5)
#define WEAPON_SHOVEL (6)
#define WEAPON_POOLSTICK (7)
#define WEAPON_KATANA (8)
#define WEAPON_CHAINSAW (9)
#define WEAPON_DILDO (10)
#define WEAPON_DILDO2 (11)
#define WEAPON_VIBRATOR (12)
#define WEAPON_VIBRATOR2 (13)
#define WEAPON_FLOWER (14)
#define WEAPON_CANE (15)
#define WEAPON_GRENADE (16)
#define WEAPON_TEARGAS (17)
#define WEAPON_MOLTOV (18)
#define WEAPON_COLT45 (22)
#define WEAPON_SILENCED (23)
#define WEAPON_DEAGLE (24)
#define WEAPON_SHOTGUN (25)
#define WEAPON_SAWEDOFF (26)
#define WEAPON_SHOTGSPA (27)
#define WEAPON_UZI (28)
#define WEAPON_MP5 (29)
#define WEAPON_AK47 (30)
#define WEAPON_M4 (31)
#define WEAPON_TEC9 (32)
#define WEAPON_RIFLE (33)
#define WEAPON_SNIPER (34)
#define WEAPON_ROCKETLAUNCHER (35)
#define WEAPON_HEATSEEKER (36)
#define WEAPON_FLAMETHROWER (37)
#define WEAPON_MINIGUN (38)
#define WEAPON_SATCHEL (39)
#define WEAPON_BOMB (40)
#define WEAPON_SPRAYCAN (41)
#define WEAPON_FIREEXTINGUISHER (42)
#define WEAPON_CAMERA (43)
#define WEAPON_PARACHUTE (46)
#define WEAPON_VEHICLE (49)
#define WEAPON_DROWN (53)
#define WEAPON_COLLISION (54)
#define KEY_ACTION (1)
#define KEY_CROUCH (2)
#define KEY_FIRE (4)
#define KEY_SPRINT (8)
#define KEY_SECONDARY_ATTACK (16)
#define KEY_JUMP (32)
#define KEY_LOOK_RIGHT (64)
#define KEY_HANDBRAKE (128)
#define KEY_LOOK_LEFT (256)
#define KEY_SUBMISSION (512)
#define KEY_LOOK_BEHIND (512)
#define KEY_WALK (1024)
#define KEY_ANALOG_UP (2048)
#define KEY_ANALOG_DOWN (4096)
#define KEY_ANALOG_LEFT (8192)
#define KEY_ANALOG_RIGHT (16384)
#define KEY_UP (-128)
#define KEY_DOWN (128)
#define KEY_LEFT (-128)
#define KEY_RIGHT (128)
#define CLICK_SOURCE_SCOREBOARD 0
#define MP MAX_PLAYERS
#if defined UZYJ_WWII
#define COLOR_NAZI 0xFFF02455
#define COLOR_SON 0x4BFF3355
#define COLOR_ALLY 0xFF242455
#define COLOR_ALLYAIR 0x33FFFF55
#define TEAM_NAZI 0
#define TEAM_SON 1
#define TEAM_ALLY 2
#define TEAM_ALLYAIR 3
new PlayerWarTeam[MAX_PLAYERS] = {-1,...};
new Float:BombX[4],Float:BombY[4],Float:unusedZ,NationBomber[4][3],BomberUsed[4],Float:BombTime[4],Float:StartBombing[4];
#endif
new MinigunArea;
#if defined UZYJ_SPAR
new SparArena;
#endif
#if defined UZYJ_RPG
new RpgArena;
#endif
#if defined UZYJ_WALKIULICZNE
new WalkiUliczneArena;
#endif
#if defined UZYJ_DWIEWIEZE
new DwieWiezeArena;
#endif
enum floatround_method {
floatround_round,
floatround_floor,
floatround_ceil,
floatround_tozero,
floatround_unbiased
}
enum anglemode {
radian,
degrees,
grades
}
enum filemode
{
io_read,
io_write,
io_readwrite,
io_append,
}
enum seek_whence
{
seek_start,
seek_current,
seek_end,
}
// new include
#define WEAPONSTATE_UNKNOWN -1
#define WEAPONSTATE_NO_BULLETS 0
#define WEAPONSTATE_LAST_BULLET 1
#define WEAPONSTATE_MORE_BULLETS 2
#define WEAPONSTATE_RELOADING 3
native GetPlayerWeaponState(playerid);
native SetPVarInt(playerid, varname[], int_value);
native GetPVarInt(playerid, varname[]);
native SetPVarString(playerid, varname[], string_value[]);
native GetPVarString(playerid, varname[], string_return[], len);
native SetPVarFloat(playerid, varname[], Float:float_value);
native Float:GetPVarFloat(playerid, varname[]);
native DeletePVar(playerid, varname[]);
//
// HTTP requests
#define HTTP_GET 1
#define HTTP_POST 2
#define HTTP_HEAD 3
// HTTP error response codes
// These codes compliment ordinary HTTP response codes returned in 'response_code'
// (10x) (20x OK) (30x Moved) (40x Unauthorised) (50x Server Error)
#define HTTP_ERROR_BAD_HOST 1
#define HTTP_ERROR_NO_SOCKET 2
#define HTTP_ERROR_CANT_CONNECT 3
#define HTTP_ERROR_CANT_WRITE 4
#define HTTP_ERROR_CONTENT_TOO_BIG 5
#define HTTP_ERROR_MALFORMED_RESPONSE 6
native HTTP(index, type, url[], data[], callback[]);
// example HTTP callback: public MyHttpResponse(index, response_code, data[]) { ... }
//
// PVar enumeration
#define PLAYER_VARTYPE_NONE 0
#define PLAYER_VARTYPE_INT 1
#define PLAYER_VARTYPE_STRING 2
#define PLAYER_VARTYPE_FLOAT 3
native GetPVarsUpperIndex(playerid);
native GetPVarNameAtIndex(playerid, index, ret_varname[], ret_len);
native GetPVarType(playerid, varname[]);
native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z);
native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z);
//native GetPlayerCameraUpVector(playerid, &Float:x, &Float:y, &Float:z);
native LimitPlayerMarkerRadius(Float:marker_radius);
forward OnVehicleDamageStatusUpdate(vehicleid, playerid);
native GetVehicleDamageStatus(vehicleid, &panels, &doors, &lights, &tires);
native UpdateVehicleDamageStatus(vehicleid, panels, doors, lights, tires);
//native pwncurl_get(url[],buf[],buflen);
stock pwncurl_get(url[],buf[],buflen)
{
#pragma unused url
#pragma unused buf
#pragma unused buflen
}
native heapspace();
native funcidx(const name[]);
native numargs();
native getarg(arg, index=0);
native setarg(arg, index=0, value);
native tolower(c);
native toupper(c);
native swapchars(c);
native random(max);
native min(value1, value2);
native max(value1, value2);
native clamp(value, min=cellmin, max=cellmax);
native getproperty(id=0, const name[]="", value=cellmin, string[]="");
native setproperty(id=0, const name[]="", value=cellmin, const string[]="");
native deleteproperty(id=0, const name[]="", value=cellmin);
native existproperty(id=0, const name[]="", value=cellmin);
native Float:float(value);
native Float:floatstr(const string[]);
native Float:floatmul(Float:oper1, Float:oper2);
native Float:floatdiv(Float:dividend, Float:divisor);
native Float:floatadd(Float:oper1, Float:oper2);
native Float:floatsub(Float:oper1, Float:oper2);
native Float:floatfract(Float:value);
native floatround(Float:value, floatround_method:method=floatround_round);
native floatcmp(Float:oper1, Float:oper2);
native Float:floatsqroot(Float:value);
native Float:floatpower(Float:value, Float:exponent);
native Float:floatlog(Float:value, Float:base=10.0);
native Float:floatsin(Float:value, anglemode:mode=radian);
native Float:floatcos(Float:value, anglemode:mode=radian);
native Float:floattan(Float:value, anglemode:mode=radian);
native Float:floatabs(Float:value);
native Float:operator*(Float:oper1, Float:oper2) = floatmul;
native Float:operator/(Float:oper1, Float:oper2) = floatdiv;
native Float:operator+(Float:oper1, Float:oper2) = floatadd;
native Float:operator-(Float:oper1, Float:oper2) = floatsub;
native Float:operator=(oper) = float;
native strlen(const string[]);
native strpack(dest[], const source[], maxlength=sizeof dest);
native strunpack(dest[], const source[], maxlength=sizeof dest);
native strcat(dest[], const source[], maxlength=sizeof dest);
native strmid(dest[], const source[], start, end, maxlength=sizeof dest);
native bool: strins(string[], const substr[], pos, maxlength=sizeof string);
native bool: strdel(string[], start, end);
native strcmp(const string1[], const string2[], bool:ignorecase=false, length=cellmax);
native strfind(const string[], const sub[], bool:ignorecase=false, pos=0);
native strval(const string[]);
native valstr(dest[], value, bool:pack=false);
native bool: ispacked(const string[]);
native uudecode(dest[], const source[], maxlength=sizeof dest);
native uuencode(dest[], const source[], numbytes, maxlength=sizeof dest);
native memcpy(dest[], const source[], index=0, numbytes, maxlength=sizeof dest);
native File:fopen(const name[], filemode: mode = io_readwrite);
native bool:fclose(File: handle);
native File:ftemp();
native bool:fremove(const name[]);
native fwrite(File: handle, const string[]);
native fread(File: handle, string[], size = sizeof string, bool: pack = false);
native bool:fputchar(File: handle, value, bool: utf8 = true);
native fgetchar(File: handle, value, bool: utf8 = true);
native fblockwrite(File: handle, const buffer[], size = sizeof buffer);
native fblockread(File: handle, buffer[], size = sizeof buffer);
native fseek(File: handle, position = 0, seek_whence: whence = seek_start);
native flength(File: handle);
native fexist(const pattern[]);
native bool:fmatch(name[], const pattern[], index = 0, size = sizeof name);
native gettime(&hour=0, &minute=0, &second=0);
native getdate(&year=0, &month=0, &day=0);
native tickcount(&granularity=0);
native sendstring(const message[], const destination[]="");
native sendpacket(const packet[], size, const destination[]="");
native listenport(port);
native SetSpawnInfo(playerid, team, skin, Float:x, Float:y, Float:z, Float:rotation, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
native SpawnPlayer(playerid);
native SetPlayerPos(playerid, Float:x, Float:y, Float:z);
native SetPlayerPosFindZ(playerid, Float:x, Float:y, Float:z);
native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z);
native SetPlayerFacingAngle(playerid,Float:ang);
native GetPlayerFacingAngle(playerid,&Float:ang);
native IsPlayerInRangeOfPoint(playerid, Float:range, Float:x, Float:y, Float:z);
native IsPlayerStreamedIn(playerid, forplayerid);
native SetPlayerInterior(playerid,interiorid);
native GetPlayerInterior(playerid);
native SetPlayerHealth(playerid, Float:health);
native GetPlayerHealth(playerid, &Float:health);
native SetPlayerArmour(playerid, Float:armour);
native GetPlayerArmour(playerid, &Float:armour);
native SetPlayerAmmo(playerid, weaponslot, ammo);
native GetPlayerAmmo(playerid);
native SetPlayerTeam(playerid, teamid);
native GetPlayerTeam(playerid);
native SetPlayerScore(playerid,score);
native GetPlayerScore(playerid);
native GetPlayerDrunkLevel(playerid);
native SetPlayerDrunkLevel(playerid, level);
native SetPlayerColor(playerid,color);
native GetPlayerColor(playerid);
native SetPlayerSkin(playerid, skinid);
native GetPlayerSkin(playerid);
native GivePlayerWeapon(playerid, weaponid, ammo);
native ResetPlayerWeapons(playerid);
native SetPlayerArmedWeapon(playerid, weaponid);
native GetPlayerWeaponData(playerid, slot, &weapons, &ammo);
native GivePlayerMoney(playerid,money);
native ResetPlayerMoney(playerid);
native SetPlayerName(playerid, const name[]);
native GetPlayerMoney(playerid);
native GetPlayerState(playerid);
native GetPlayerIp(playerid, name[], len);
native GetPlayerPing(playerid);
native GetPlayerWeapon(playerid);
native GetPlayerKeys(playerid, &keys, &updown, &leftright);
native GetPlayerName(playerid, const name[], len);
native SetPlayerTime(playerid, hour, minute);
native GetPlayerTime(playerid, &hour, &minute);
native TogglePlayerClock(playerid, toggle);
native SetPlayerWeather(playerid, weather);
native ForceClassSelection(playerid);
native SetPlayerWantedLevel(playerid, level);
native GetPlayerWantedLevel(playerid);
native SetPlayerFightingStyle(playerid, style);
native GetPlayerFightingStyle(playerid);
native SetPlayerVelocity(playerid, Float:X, Float:Y, Float:Z);
native GetPlayerVelocity( playerid, &Float:X, &Float:Y, &Float:Z );
native PlayCrimeReportForPlayer(playerid, suspectid, crime);
native SetPlayerShopName(playerid, shopname[]);
native SetPlayerSkillLevel(playerid, skill, level);
native GetPlayerSurfingVehicleID(playerid);
native SetPlayerHoldingObject(playerid, modelid, bone, Float:fOffsetX = 0.0, Float:fOffsetY = 0.0, Float:fOffsetZ = 0.0, Float:fRotX = 0.0, Float:fRotY = 0.0, Float:fRotZ = 0.0);
native StopPlayerHoldingObject(playerid);
native IsPlayerHoldingObject(playerid);
native SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime);
native PutPlayerInVehicle(playerid, vehicleid, seatid);
native GetPlayerVehicleID(playerid);
native GetPlayerVehicleSeat(playerid);
native RemovePlayerFromVehicle(playerid);
native TogglePlayerControllable(playerid, toggle);
native PlayerPlaySound(playerid, soundid, Float:x, Float:y, Float:z);
native ApplyAnimation(playerid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time, forcesync = 0);
native ClearAnimations(playerid, forcesync = 0);
native GetPlayerAnimationIndex(playerid); // return the index of any running applied animations (0 if none are running)
native GetAnimationName(index, animlib[], len1, animname[], len2); // get the animation lib/name for the index
native GetPlayerSpecialAction(playerid);
native SetPlayerSpecialAction(playerid,actionid);
native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size);
native DisablePlayerCheckpoint(playerid);
native SetPlayerRaceCheckpoint(playerid, type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size);
native DisablePlayerRaceCheckpoint(playerid);
native SetPlayerWorldBounds(playerid,Float:x_max,Float:x_min,Float:y_max,Float:y_min);
native SetPlayerMarkerForPlayer(playerid, showplayerid, color);
native ShowPlayerNameTagForPlayer(playerid, showplayerid, show);
native SetPlayerMapIcon(playerid, iconid, Float:x, Float:y, Float:z, markertype, color);
native RemovePlayerMapIcon(playerid, iconid);
native SetPlayerCameraPos(playerid,Float:x, Float:y, Float:z);
native SetPlayerCameraLookAt(playerid, Float:x, Float:y, Float:z);
native SetCameraBehindPlayer(playerid);
native AllowPlayerTeleport(playerid, allow);
native IsPlayerConnected(playerid);
native IsPlayerInVehicle(playerid, vehicleid);
native IsPlayerInAnyVehicle(playerid);
native IsPlayerInCheckpoint(playerid);
native IsPlayerInRaceCheckpoint(playerid);
native SetPlayerVirtualWorld(playerid, worldid);
native GetPlayerVirtualWorld(playerid);
native EnableStuntBonusForPlayer(playerid, enable);
native EnableStuntBonusForAll(enable);
native TogglePlayerSpectating(playerid, toggle);
native PlayerSpectatePlayer(playerid, targetplayerid, mode = SPECTATE_MODE_NORMAL);
native PlayerSpectateVehicle(playerid, targetvehicleid, mode = SPECTATE_MODE_NORMAL);
native StartRecordingPlayerData(playerid, recordtype, recordname[]);
native StopRecordingPlayerData(playerid);
native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay);
native DestroyVehicle(vehicleid);
native IsVehicleStreamedIn(vehicleid, forplayerid);
native GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z);
native SetVehiclePos(vehicleid, Float:x, Float:y, Float:z);
native GetVehicleZAngle(vehicleid, &Float:z_angle);
native SetVehicleZAngle(vehicleid, Float:z_angle);
native SetVehicleParamsForPlayer(vehicleid,playerid,objective,doorslocked);
native SetVehicleToRespawn(vehicleid);
native LinkVehicleToInterior(vehicleid, interiorid);
native AddVehicleComponent(vehicleid, componentid);
native RemoveVehicleComponent(vehicleid, componentid);
native ChangeVehicleColor(vehicleid, color1, color2);
native ChangeVehiclePaintjob(vehicleid, paintjobid);
native SetVehicleHealth(vehicleid, Float:health);
native GetVehicleHealth(vehicleid, &Float:health);
native AttachTrailerToVehicle(trailerid, vehicleid);
native DetachTrailerFromVehicle(vehicleid);
native IsTrailerAttachedToVehicle(vehicleid);
native GetVehicleTrailer(vehicleid);
native SetVehicleNumberPlate(vehicleid, numberplate[]);
native GetVehicleModel(vehicleid);
native GetVehicleComponentInSlot(vehicleid, slot); // There is 1 slot for each CARMODTYPE_*
native GetVehicleComponentType(component); // Find CARMODTYPE_* for component id
native RepairVehicle(vehicleid); // Repairs the damage model and resets the health
native GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z);
native SetVehicleAngularVelocity(vehicleid, Float:X, Float:Y, Float:Z);
native GetVehicleVelocity(vehicleid, &Float:X, &Float:Y, &Float:Z);
native SetVehicleVelocity(vehicleid, Float:X, Float:Y, Float:Z);
native SetVehicleVirtualWorld(vehicleid, worldid);
native GetVehicleVirtualWorld(vehicleid);
native CreatePlayerObject(playerid, modelid, Float:X, Float:Y, Float:Z, Float:rX, Float:rY, Float:rZ, Float:DrawDistance = 0.0);
native SetPlayerObjectPos(playerid, objectid, Float:X, Float:Y, Float:Z);
native GetPlayerObjectPos(playerid, objectid, &Float:X, &Float:Y, &Float:Z);
native SetPlayerObjectRot(playerid, objectid, Float:RotX, Float:RotY, Float:RotZ);
native GetPlayerObjectRot(playerid, objectid, &Float:RotX, &Float:RotY, &Float:RotZ);
native IsValidPlayerObject(playerid, objectid);
native DestroyPlayerObject(playerid, objectid);
native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed);
native StopPlayerObject(playerid, objectid);
native AttachObjectToPlayer(objectid, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:rX, Float:rY, Float:rZ);
native DB:db_open(name[]);
native db_close(DB:db);
native DBResult:db_query(DB:db,query[]);
native db_free_result(DBResult:dbresult);
native db_num_rows(DBResult:dbresult);
native db_next_row(DBResult:dbresult);
native db_num_fields(DBResult:dbresult);
native db_field_name(DBResult:dbresult, field, result[], maxlength);
native db_get_field(DBResult:dbresult, field, result[], maxlength);
native db_get_field_assoc(DBResult:dbresult, const field[], result[], maxlength);
native print(const string[]);
native printf(const format[], {Float,_}:...);
native format(output[], len, const format[], {Float,_}:...);
native SendClientMessage(playerid, color, const message[]);
native SendClientMessageToAll(color, const message[]);
native SendPlayerMessageToPlayer(playerid, senderid, const message[]);
native SendPlayerMessageToAll(senderid, const message[]);
native SendDeathMessage(killer,killee,weapon);
native GameTextForAll(const string[],time,style);
native GameTextForPlayer(playerid,const string[],time,style);
native SetTimer(funcname[], interval, repeating);
native SetTimerEx(funcname[], interval, repeating, const format[], {Float,_}:...);
native KillTimer(timerid);
native GetTickCount();
native GetMaxPlayers();
native LimitGlobalChatRadius(Float:chat_radius);
native CallRemoteFunction(const function[], const format[], {Float,_}:...);
native CallLocalFunction(const function[], const format[], {Float,_}:...);
native Float:asin(Float:value);
native Float:acos(Float:value);
native Float:atan(Float:value);
native Float:atan2(Float:x, Float:y);
native SetGameModeText(const string[]);
native SetTeamCount(count);
native AddPlayerClass(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
native AddPlayerClassEx(teamid, modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, weapon1, weapon1_ammo, weapon2, weapon2_ammo, weapon3, weapon3_ammo);
native AddStaticVehicle(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2);
native AddStaticVehicleEx(modelid, Float:spawn_x, Float:spawn_y, Float:spawn_z, Float:z_angle, color1, color2, respawn_delay);
native AddStaticPickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native CreatePickup(model, type, Float:X, Float:Y, Float:Z, virtualworld = 0);
native DestroyPickup(pickup);
native ShowNameTags(show);
native ShowPlayerMarkers(mode);
native GameModeExit();
native SetWorldTime(hour);
native GetWeaponName(weaponid, const weapon[], len);
native EnableTirePopping(enable);
native AllowInteriorWeapons(allow);
native SetWeather(weatherid);
native SetGravity(Float:gravity);
native AllowAdminTeleport(allow);
native SetDeathDropAmount(amount);
native CreateExplosion(Float:X, Float:Y, Float:Z, type, Float:Radius);
native EnableZoneNames(enable);
native UsePlayerPedAnims(); // Will cause the players to use CJ running/walking animations
native DisableInteriorEnterExits(); // will disable all interior enter/exits in the game.
native SetNameTagDrawDistance(Float:distance); // Distance at which nametags will start rendering on the client.
native DisableNameTagLOS(); // Disables the nametag Line-Of-Sight checking
native ConnectNPC(name[], script[]);
native IsPlayerNPC(playerid);
native IsPlayerAdmin(playerid);
native Kick(playerid);
native Ban(playerid);
native BanEx(playerid, const reason[]);
native SendRconCommand(command[]);
native GetServerVarAsString(const varname[], buffer[], len);
native GetServerVarAsInt(const varname[]);
native GetServerVarAsBool(const varname[]);
native Menu:CreateMenu(const title[], columns, Float:x, Float:y, Float:col1width, Float:col2width = 0.0);
native DestroyMenu(Menu:menuid);
native AddMenuItem(Menu:menuid, column, const menutext[]);
native SetMenuColumnHeader(Menu:menuid, column, const columnheader[]);
native ShowMenuForPlayer(Menu:menuid, playerid);
native HideMenuForPlayer(Menu:menuid, playerid);
native IsValidMenu(Menu:menuid);
native DisableMenu(Menu:menuid);
native DisableMenuRow(Menu:menuid, row);
native Menu:GetPlayerMenu(playerid);
native Text:TextDrawCreate(Float:x, Float:y, text[]);
native TextDrawDestroy(Text:text);
native TextDrawLetterSize(Text:text, Float:x, Float:y);
native TextDrawTextSize(Text:text, Float:x, Float:y);
native TextDrawAlignment(Text:text, alignment);
native TextDrawColor(Text:text, color);
native TextDrawUseBox(Text:text, use);
native TextDrawBoxColor(Text:text, color);
native TextDrawSetShadow(Text:text, size);
native TextDrawSetOutline(Text:text, size);
native TextDrawBackgroundColor(Text:text, color);
native TextDrawFont(Text:text, font);
native TextDrawSetProportional(Text:text, set);
native TextDrawShowForPlayer(playerid, Text:text);
native TextDrawHideForPlayer(playerid, Text:text);
native TextDrawShowForAll(Text:text);
native TextDrawHideForAll(Text:text);
native TextDrawSetString(Text:text, string[]);
native GangZoneCreate(Float:minx, Float:miny, Float:maxx, Float:maxy);
native GangZoneDestroy(zone);
native GangZoneShowForPlayer(playerid, zone, color);
native GangZoneShowForAll(zone, color);
native GangZoneHideForPlayer(playerid, zone);
native GangZoneHideForAll(zone);
native GangZoneFlashForPlayer(playerid, zone, flashcolor);
native GangZoneFlashForAll(zone, flashcolor);
native GangZoneStopFlashForPlayer(playerid, zone);
native GangZoneStopFlashForAll(zone);
native Text3D:Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS=0);
native Delete3DTextLabel(Text3D:id);
native Attach3DTextLabelToPlayer(Text3D:id, playerid, Float:OffsetX, Float:OffsetY, Float:OffsetZ);
native Attach3DTextLabelToVehicle(Text3D:id, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ);
native Update3DTextLabelText(Text3D:id, color, text[]);
native PlayerText3D:CreatePlayer3DTextLabel(playerid, text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, attachedplayer=INVALID_PLAYER_ID, attachedvehicle=INVALID_VEHICLE_ID, testLOS=0);
native DeletePlayer3DTextLabel(playerid, PlayerText3D:id);
native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, text[]);
native ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
stock Float:operator++(Float:oper)return oper+1.0;
stock Float:operator--(Float:oper)return oper-1.0;
stock Float:operator-(Float:oper)return oper^Float:cellmin;
stock Float:operator*(Float:oper1, oper2)return floatmul(oper1, float(oper2));
stock Float:operator/(Float:oper1, oper2)return floatdiv(oper1, float(oper2));
stock Float:operator/(oper1, Float:oper2)return floatdiv(float(oper1), oper2);
stock Float:operator+(Float:oper1, oper2)return floatadd(oper1, float(oper2));
stock Float:operator-(Float:oper1, oper2)return floatsub(oper1, float(oper2));
stock Float:operator-(oper1, Float:oper2)return floatsub(float(oper1), oper2);
stock bool:operator==(Float:oper1, Float:oper2)return floatcmp(oper1, oper2) == 0;
stock bool:operator==(Float:oper1, oper2)return floatcmp(oper1, float(oper2)) == 0;
stock bool:operator!=(Float:oper1, Float:oper2)return floatcmp(oper1, oper2) != 0;
stock bool:operator!=(Float:oper1, oper2)return floatcmp(oper1, float(oper2)) != 0;
stock bool:operator>(Float:oper1, Float:oper2)return floatcmp(oper1, oper2) > 0;
stock bool:operator>(Float:oper1, oper2)return floatcmp(oper1, float(oper2)) > 0;
stock bool:operator>(oper1, Float:oper2)return floatcmp(float(oper1), oper2) > 0;
stock bool:operator>=(Float:oper1, Float:oper2)return floatcmp(oper1, oper2) >= 0;
stock bool:operator>=(Float:oper1, oper2)return floatcmp(oper1, float(oper2)) >= 0;
stock bool:operator>=(oper1, Float:oper2)return floatcmp(float(oper1), oper2) >= 0;
stock bool:operator<(Float:oper1, Float:oper2)return floatcmp(oper1, oper2) < 0;
stock bool:operator<(Float:oper1, oper2)return floatcmp(oper1, float(oper2)) < 0;
stock bool:operator<(oper1, Float:oper2)return floatcmp(float(oper1), oper2) < 0;
stock bool:operator<=(Float:oper1, Float:oper2)return floatcmp(oper1, oper2) <= 0;
stock bool:operator<=(Float:oper1, oper2)return floatcmp(oper1, float(oper2)) <= 0;
stock bool:operator<=(oper1, Float:oper2)return floatcmp(float(oper1), oper2) <= 0;
stock bool:operator!(Float:oper)return (_:oper & cellmax) == 0;
forward operator%(Float:oper1, Float:oper2);
forward operator%(Float:oper1, oper2);
forward operator%(oper1, Float:oper2);
forward @receivestring(const message[], const source[]);
forward @receivepacket(const packet[], size, const source[]);
forward OnGameModeInit();
forward OnGameModeExit();
forward OnFilterScriptInit();
forward OnFilterScriptExit();
forward OnPlayerConnect(playerid);
forward OnPlayerDisconnect(playerid, reason);
forward OnPlayerSpawn(playerid);
forward OnPlayerDeath(playerid, killerid, reason);
forward OnVehicleSpawn(vehicleid);
forward OnVehicleDeath(vehicleid, killerid);
forward OnPlayerText(playerid, text[]);
forward OnPlayerCommandText(playerid, cmdtext[]);
forward OnPlayerRequestClass(playerid, classid);
forward OnPlayerEnterVehicle(playerid, vehicleid, ispassenger);
forward OnPlayerExitVehicle(playerid, vehicleid);
forward OnPlayerStateChange(playerid, newstate, oldstate);
forward OnPlayerEnterCheckpoint(playerid);
forward OnPlayerLeaveCheckpoint(playerid);
forward OnPlayerEnterRaceCheckpoint(playerid);
forward OnPlayerLeaveRaceCheckpoint(playerid);
forward OnRconCommand(cmd[]);
forward OnPlayerRequestSpawn(playerid);
forward OnObjectMoved(objectid);
forward OnPlayerObjectMoved(playerid, objectid);
forward OnPlayerPickUpPickup(playerid, pickupid);
forward OnVehicleMod(playerid, vehicleid, componentid);
forward OnEnterExitModShop(playerid, enterexit, interiorid);
forward OnVehiclePaintjob(playerid, vehicleid, paintjobid);
forward OnVehicleRespray(playerid, vehicleid, color1, color2);
forward OnPlayerSelectedMenuRow(playerid, row);
forward OnPlayerExitedMenu(playerid);
forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid);
forward OnPlayerKeyStateChange(playerid, newkeys, oldkeys);
forward OnRconLoginAttempt( ip[], password[], success );
forward OnPlayerUpdate(playerid);
forward OnPlayerStreamIn(playerid, forplayerid);
forward OnPlayerStreamOut(playerid, forplayerid);
forward OnVehicleStreamIn(vehicleid, forplayerid);
forward OnVehicleStreamOut(vehicleid, forplayerid);
forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]);
forward OnPlayerClickPlayer(playerid, clickedplayerid, source);
const EOF = -1;
stock isNumeric(const string99[]) {
new length=strlen(string99);
if (length==0) return false;
for (new i = 0; i < length; i++) {
if (
(string99[i] > '9' || string99[i] < '0' && string99[i]!='-' && string99[i]!='+') // Not a number,'+' or '-'
|| (string99[i]=='-' && i!=0) // A '-' but not at first.
|| (string99[i]=='+' && i!=0) // A '+' but not at first.
) return false;
}
if (length==1 && (string99[0]=='-' || string99[0]=='+')) return false;
return true;
}
// Originally created by mabako, tuned by DracoBlue
stock mktime222(hour,minute,second,day,month,year) {
new timestamp2;
timestamp2 = second + (minute * 60) + (hour * 3600);
new days_of_month[12];
if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) {
days_of_month = {31,29,31,30,31,30,31,31,30,31,30,31}; // Schaltjahr
} else {
days_of_month = {31,28,31,30,31,30,31,31,30,31,30,31}; // keins
}
new days_this_year = 0;
days_this_year = day;
if(month > 1) { // No January Calculation, because its always the 0 past months
for(new i=0; i<month-1;i++) {
days_this_year += days_of_month[i];
}
}
timestamp2 += days_this_year * 86400;
for(new j=1970;j<year;j++) {
timestamp2 += 31536000;
if ( ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0) ) timestamp2 += 86400; // Schaltjahr + 1 Tag
}
return timestamp2;
}
/**
* Return if a Email is valid or not
* @param value
*/
stock ValidEmail(email[]) {
if(!strfind(email,"@",true))return false;
if(!strfind(email,".",true))return false;
return true;
}
/**
* Return a timestamp
*/
stock Time() {
new hour,minute,second;
new year, month,day;
gettime(hour, minute, second);
getdate(year, month, day);
return mktime222(hour,minute,second,day,month,year);
}
/**
* Return a timestamp
*/
stock Now() {
new hour,minute,second;
new year, month,day;
gettime(hour, minute, second);
getdate(year, month, day);
return mktime222(hour,minute,second,day,month,year);
}
/**
* Return the value of an hex-string
* @param string
*/
stock HexToInt(string99[]) {
if (string99[0]==0) return 0;
new i;
new cur=1;
new res=0;
for (i=strlen(string99);i>0;i--) {
if (string99[i-1]<58) res=res+cur*(string99[i-1]-48); else res=res+cur*(string99[i-1]-65+10);
cur=cur*16;
}
return res;
}
/**
* Return the int as string
* @param number
*/
stock IntToHex(number)
{
new m=1;
new depth=0;
while (number>=m) {
m = m*16;
depth++;
}
depth--;
new str[256];
for (new i = depth; i >= 0; i--)
{
str[i] = ( number & 0x0F) + 0x30; // + (tmp > 9 ? 0x07 : 0x00)
str[i] += (str[i] > '9') ? 0x07 : 0x00;
number >>= 4;
}
str[8] = '\0';
return str;
}
/**
* Return the string as int
* @param string
*/
stock StrToInt(string99[]) {
return strval(string99);
}
/**
* Return the value as string
* @param value
*/
stock IntToStr(value) {
new tmp[256];
valstr(tmp, value);
return tmp;
}
/**
* Return the truncated value
* @param Float:value
*/
stock trunc(Float:value) {
return floatround(value,floatround_floor);
}
/**
* Sets money for player
* @param playerid
* howmuch
*/
stock SetPlayerMoney(playerid,howmuch) {
//PRIVATE_Last_Money[playerid]=howmuch;
GivePlayerMoney(playerid,howmuch-GetPlayerMoney(playerid));
}
/**
* Copies a file (Source file won't be deleted!)
* @param oldname
* newname
* @requires WINDOWS
*/
stock fcopy(oldname[],newname[]) {
new File:ohnd,File:nhnd;
if (!fexist(oldname)) return false;
ohnd=fopen(oldname,io_read);
nhnd=fopen(newname,io_write);
new buf2[1];
new i;
for (i=flength(ohnd);i>0;i--) {
fputchar(nhnd, fgetchar(ohnd, buf2[0],false),false);
}
fclose(ohnd);
fclose(nhnd);
return true;
}
/**
* Copies a textfile (Source file won't be deleted!)
* @param oldname
* newname
*/
stock fcopytextfile(oldname[],newname[]) {
new File:ohnd,File:nhnd;
if (!fexist(oldname)) return false;
ohnd=fopen(oldname,io_read);
nhnd=fopen(newname,io_write);
new tmpres[256];
while (fread(ohnd,tmpres)) {
StripNewLine(tmpres);
format(tmpres,sizeof(tmpres),"%s\r\n",tmpres);
fwrite(nhnd,tmpres);
}
fclose(ohnd);
fclose(nhnd);
return true;
}
/**
* Renames a file (Source file will be deleted!)
* @param oldname
* newname
* @requires WINDOWS (because fcopy does)
*/
stock frename(oldname[],newname[]) {
if (!fexist(oldname)) return false;
fremove(newname);
if (!fcopy(oldname,newname)) return false;
fremove(oldname);
return true;
}
/**
* Renames a file (Source file will be deleted!)
* @param oldname
* newname
*/
stock frenametextfile(oldname[],newname[]) {
if (!fexist(oldname)) return false;
fremove(newname);
if (!fcopytextfile(oldname,newname)) return false;
fremove(oldname);
return true;
}
/**
* Strips Newline from the end of a string.
* Idea: Y_Less, Bugfixing (when length=1) by DracoBlue
* @param string
*/
stock StripNewLine(string99[])
{
new len = strlen(string99);
if (string99[0]==0) return ;
if ((string99[len - 1] == '\n') || (string99[len - 1] == '\r')) {
string99[len - 1] = 0;
if (string99[0]==0) return ;
if ((string99[len - 2] == '\n') || (string99[len - 2] == '\r')) string99[len - 2] = 0;
}
}
/**
* Copies items from one array/string into return.
* @param source
* index (where to start, 0 is first)
* numbytes (how much)
*/
ret_memcpy(source[],index=0,numbytes) {
new tmp[256];
new i=0;
tmp[0]=0;
if (index>=strlen(source)) return tmp;
if (numbytes+index>=strlen(source)) numbytes=strlen(source)-index;
if (numbytes<=0) return tmp;
for (i=index;i<numbytes+index;i++) {
tmp[i-index]=source[i];
if (source[i]==0) return tmp;
}
tmp[numbytes]=0;
return tmp;
}
/**
* Copies items from one array/string into another.
* @param dest
* source
* count
*/
stock copy(dest[],source[],count) {
dest[0]=0;
if (count<0) return false;
if (count>strlen(source)) count=strlen(source);
new i=0;
for (i=0;i<count;i++) {
dest[i]=source[i];
if (source[i]==0) return true;
}
dest[count]=0;
return true;
}
/**
* Deletes the first 'count' items of a array/string
* @param string[]
* count
*/
stock delete(string99[],count) {
new tmp[256];
tmp[0]=0;
if (count<=0) {
format(tmp,sizeof(tmp),"%s",string99);
return tmp;
}
tmp=ret_memcpy(string99,count,strlen(string99));
return tmp;
}
/**
* Sets a string's value to source.
* @param dest
* source
* count
*/
stock set(dest[],source[]) {
new count = strlen(source);
new i=0;
for (i=0;i<count;i++) {
dest[i]=source[i];
}
dest[count]=0;
}
/**
* Checks wether two strings are equal (case insensetive)
* @param str1
* str2
*/
stock equal(str1[],str2[],bool:ignorecase) {
if (strlen(str1)!=strlen(str2)) return false;
if (strcmp(str1,str2,ignorecase)==0) return true;
return false;
}
/**
* Returns an element of a string splitted by ' ', default index is 0.
* @param string
* index
*/
stock strtok(const string99[], &index,seperator=' ')
{
new length = strlen(string99);
new offset = index;
new result[256];
while ((index < length) && (string99[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
{
result[index - offset] = string99[index];
index++;
}
result[index - offset] = EOS;
if ((index < length) && (string99[index] == seperator))
{
index++;
}
return result;
}
stock mod(up,down) {
return up-(floatround((up/down),floatround_floor))*down;
}
stock div(up,down) {
return (floatround((up/down),floatround_floor));
}
/**
* Returns a hashed value in adler32 as int
* @param buf
*/
stock num_hash(buf[])
{
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++) {
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
/**
* Returns a hashed value in adler32 as string
* @param buf
*/
stock hash(str2[]) {
new tmpdasdsa[256];
tmpdasdsa[0]=0;
valstr(tmpdasdsa,num_hash(str2));
return tmpdasdsa;
}
/**
* Returns a string which has 'newstr' where 'trg' was before
* @param trg
* newstr
* src
*/
stock strreplace(trg[],newstr[],src[]) {
new f=0;
new s1[256];
new tmp[256];
format(s1,sizeof(s1),"%s",src);
f = strfind(s1,trg);
tmp[0]=0;
while (f>=0) {
strcat(tmp,ret_memcpy(s1, 0, f));
strcat(tmp,newstr);
format(s1,sizeof(s1),"%s",ret_memcpy(s1, f+strlen(trg), strlen(s1)-f));
f = strfind(s1,trg);
}
strcat(tmp,s1);
return tmp;
}
stock reverse_strreplace(trg[],newstr[],src[]) {
new f=0;
new s1[256];
new tmp[256];
format(s1,sizeof(s1),"%s",src);
f = strfind(s1,newstr);
tmp[0]=0;
while (f>=0) {
strcat(tmp,ret_memcpy(s1, 0, f));
strcat(tmp,trg);
format(s1,sizeof(s1),"%s",ret_memcpy(s1, f+strlen(newstr), strlen(s1)-f));
f = strfind(s1,newstr);
}
strcat(tmp,s1);
return tmp;
}
/**
* Returns the string with lowercase
* @param txt
*/
stock strlower(txt[]) {
new tmp[256];
tmp[0]=0;
if (txt[0]==0) return tmp;
new i=0;
for (i=0;i<strlen(txt);i++) {
tmp[i]=tolower(txt[i]);
}
tmp[strlen(txt)]=0;
return tmp;
}
/**
* Returns the string with uppercase
* @param txt
*/
stock strupper(txt[]) {
new tmp[256];
tmp[0]=0;
if (txt[0]==0) return tmp;
new i=0;
for (i=0;i<strlen(txt);i++) {
tmp[i]=toupper(txt[i]);
}
tmp[strlen(txt)]=0;
return tmp;
}
/*
* Dini 1.5.1
* (c) Copyright 2006 by DracoBlue
*
* @author : DracoBlue (http://d...content-available-to-author-only...e.com)
* @date : 13th May 2006
* @update : 3rd June 2007
* @require : DUtils 1.8
*
* This file is provided as is (no warranties).
*
* Feel free to use it, a little message in
* about box is honouring thing, isn't it?
*
*/
#if defined _dini_included
#endinput
#endif
#define _dini_included
#pragma library dutils
stock dini_Exists(filename[]) {
if (fexist(filename)) return true;
return false;
}
stock dini_Remove(filename[]) {
if (!fexist(filename)) return false;
fremove(filename);
return true;
}
stock dini_Create(filename[]) {
new File:fhnd;
if (fexist(filename)) return false;
fhnd=fopen(filename,io_write);
fclose(fhnd);
return true;
}
stock dini_PRIVATE_ExtractKey(line[]) {
new tmp[256];
tmp[0]=0;
if (strfind(line,"=",true)==-1) return tmp;
set(tmp,strlower(ret_memcpy(line,0,strfind(line,"=",true))));
return tmp;
}
stock dini_PRIVATE_ExtractValue(line[]) {
new tmp[256];
tmp[0]=0;
if (strfind(line,"=",true)==-1) {
return tmp;
}
set(tmp,ret_memcpy(line,strfind(line,"=",true)+1,strlen(line)));
return tmp;
}
stock dini_Set(filename[],key[],value[]) {
new File:fohnd, File:fwhnd;
new bool:wasset=false;
new tmpres[256];
if (key[0]==0) return false; /* If we have no sign in key, it can't be set*/
format(tmpres,sizeof(tmpres),"%s.part",filename);
fohnd=fopen(filename,io_read);
if (!fohnd) return false;
fremove(tmpres);
fwhnd=fopen(tmpres,io_write);
// if (!fwhnd) return false;
while (fread(fohnd,tmpres)) {
StripNewLine(tmpres);
if ((!wasset)&&(equal(dini_PRIVATE_ExtractKey(tmpres),key,true))) {
/* We've got what needs to be replaced! */
format(tmpres,sizeof(tmpres),"%s=%s",key,value);
wasset=true;
}
fwrite(fwhnd,tmpres);
fwrite(fwhnd,"\r\n");
}
if (!wasset) {
format(tmpres,sizeof(tmpres),"%s=%s",key,value);
fwrite(fwhnd,tmpres);
fwrite(fwhnd,"\r\n");
}
fclose(fohnd);
fclose(fwhnd);
format(tmpres,sizeof(tmpres),"%s.part",filename);
if (fcopytextfile(tmpres,filename)) {
return fremove(tmpres);
}
return false;
}
stock dini_IntSet(filename[],key[],value) {
new valuestring[256];
format(valuestring,sizeof(valuestring),"%d",value);
return dini_Set(filename,key,valuestring);
}
stock dini_Int(filename[],key[]) {
return strval(dini_Get(filename,key));
}
stock dini_FloatSet(filename[],key[],Float:value) {
new valuestring[256];
format(valuestring,sizeof(valuestring),"%f",value);
return dini_Set(filename,key,valuestring);
}
stock Float:dini_Float(filename[],key[]) {
return floatstr(dini_Get(filename,key));
}
stock dini_Bool(filename[],key[]) {
return strval(dini_Get(filename,key));
}
stock dini_BoolSet(filename[],key[],value) {
new valuestring[256];
format(valuestring,sizeof(valuestring),"%d",value);
return dini_Set(filename,key,valuestring);
}
stock dini_Unset(filename[],key[]) {
new File:fohnd, File:fwhnd;
new tmpres[256];
format(tmpres,sizeof(tmpres),"%s.part",filename);
fohnd=fopen(filename,io_read);
if (!fohnd) return false;
fremove(tmpres);
fwhnd=fopen(tmpres,io_write);
// if (!fwhnd) return false;
while (fread(fohnd,tmpres)) {
StripNewLine(tmpres);
if (equal(dini_PRIVATE_ExtractKey(tmpres),key,true)) {
/* We've got what needs to be removed! */
} else {
format(tmpres,sizeof(tmpres),"%s",tmpres);
fwrite(fwhnd,tmpres);
fwrite(fwhnd,"\r\n");
}
}
fclose(fohnd);
fclose(fwhnd);
format(tmpres,sizeof(tmpres),"%s.part",filename);
if (fcopytextfile(tmpres,filename)) {
return fremove(tmpres);
}
return false;
}
stock dini_Get(filename[],key[]) {
new File:fohnd;
new tmpres[256];
new tmpres2[256];
tmpres[0]=0;
fohnd=fopen(filename,io_read);
if (!fohnd) return tmpres;
while (fread(fohnd,tmpres)) {
StripNewLine(tmpres);
if (equal(dini_PRIVATE_ExtractKey(tmpres),key,true)) {
/* We've got what we need */
tmpres2[0]=0;
strcat(tmpres2,dini_PRIVATE_ExtractValue(tmpres));
fclose(fohnd);
return tmpres2;
}
}
fclose(fohnd);
return tmpres;
}
stock dini_Isset(filename[],key[]) {
new File:fohnd;
new tmpres[256];
fohnd=fopen(filename,io_read);
if (!fohnd) return false;
while (fread(fohnd,tmpres)) {
StripNewLine(tmpres);
if (equal(dini_PRIVATE_ExtractKey(tmpres),key,true)) {
/* We've got what we need */
fclose(fohnd);
return true;
}
}
fclose(fohnd);
return false;
}
#define dUser(%1).( udb_User(%1,
#define dUserINT(%1).( udb_UserInt(%1,
#define dUserSet(%1).( udb_UserSet(%1,
#define dUserSetINT(%1).( udb_UserSetInt(%1,
#define dUserSetFLOAT(%1).( udb_UserSetFloat(%1,
#define dUserFLOAT(%1).( udb_UserFloat(%1,
stock udb_hash(buf[]) {
new length=strlen(buf);
new s1 = 1;
new s2 = 0;
new n;
for (n=0; n<length; n++)
{
s1 = (s1 + buf[n]) % 65521;
s2 = (s2 + s1) % 65521;
}
return (s2 << 16) + s1;
}
stock udb_encode(nickname[]) {
new tmp[256];
set(tmp,nickname);
tmp=strreplace("_","_00",tmp);
tmp=strreplace(";","_01",tmp);
tmp=strreplace("!","_02",tmp);
tmp=strreplace("/","_03",tmp);
tmp=strreplace("\\","_04",tmp);
tmp=strreplace("[","_05",tmp);
tmp=strreplace("]","_06",tmp);
tmp=strreplace("?","_07",tmp);
tmp=strreplace(".","_08",tmp);
tmp=strreplace("*","_09",tmp);
tmp=strreplace("<","_10",tmp);
tmp=strreplace(">","_11",tmp);
tmp=strreplace("{","_12",tmp);
tmp=strreplace("}","_13",tmp);
tmp=strreplace(" ","_14",tmp);
tmp=strreplace("\"","_15",tmp);
tmp=strreplace(":","_16",tmp);
tmp=strreplace("|","_17",tmp);
tmp=strreplace("=","_18",tmp);
return tmp;
}
stock udb_decode(nickname[]) {
new tmp[256];
set(tmp,nickname);
tmp=strreplace("_01",";",tmp);
tmp=strreplace("_02","!",tmp);
tmp=strreplace("_03","/",tmp);
tmp=strreplace("_04","\\",tmp);
tmp=strreplace("_05","[",tmp);
tmp=strreplace("_06","]",tmp);
tmp=strreplace("_07","?",tmp);
tmp=strreplace("_08",".",tmp);
tmp=strreplace("_09","*",tmp);
tmp=strreplace("_10","<",tmp);
tmp=strreplace("_11",">",tmp);
tmp=strreplace("_12","{",tmp);
tmp=strreplace("_13","}",tmp);
tmp=strreplace("_14"," ",tmp);
tmp=strreplace("_15","\"",tmp);
tmp=strreplace("_16",":",tmp);
tmp=strreplace("_17","|",tmp);
tmp=strreplace("_18","=",tmp);
tmp=strreplace("_00","_",tmp);
return tmp;
}
stock udb_Exists(nickname[]) {
new tmp[256];
format(tmp,sizeof(tmp),"%s.dudb.sav",udb_encode(nickname));
return fexist(tmp);
}
stock udb_Remove(nickname[]) {
new tmp[256];
format(tmp,sizeof(tmp),"%s.dudb.sav",udb_encode(nickname));
return dini_Remove(tmp);
}
stock udb_UserSetInt(nickname[],key[],value) {
new fname[256];
format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
return dini_IntSet(fname,key,value);
}
stock udb_UserSetFloat(nickname[],key[],Float:value) {
new fname[256];
format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
return dini_FloatSet(fname,key,value);
}
stock udb_UserSet(nickname[],key[],value[]) {
new fname[256];
format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
return dini_Set(fname,key,value);
}
stock udb_User(nickname[],key[]) {
new fname[256];
format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
format(fname,sizeof(fname),dini_Get(fname,key));
return fname;
}
stock Float:udb_UserFloat(nickname[],key[]) {
new fname[256];
format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
return dini_Float(fname,key);
}
stock udb_UserInt(nickname[],key[]) {
new fname[256];
format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
return dini_Int(fname,key);
}
stock udb_CheckLogin(nickname[],pwd[]) {
new fname[256];
format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
if (udb_UserInt(nickname,"password_hash")==udb_hash(pwd)) return true;
return false;
}
stock udb_Create(nickname[],pwd[]) {
if (udb_Exists(nickname)) return false;
new fname[256];
format(fname,sizeof(fname),"%s.dudb.sav",udb_encode(nickname));
dini_Create(fname);
udb_UserSetInt(nickname,"password_hash",udb_hash(pwd));
return true;
}
stock udb_RenameUser(nickname[],newnick[]) {
new oldfname[256];
new newfname[256];
format(oldfname,sizeof(oldfname),"%s.dudb.sav",udb_encode(nickname));
format(newfname,sizeof(newfname),"%s.dudb.sav",udb_encode(newnick));
return frenametextfile(oldfname,newfname);
}
stock dini_IntGet(filename[],slot[]){
new tmp[256],value;
tmp = dini_Get(filename, slot);
if(!isnull(tmp)){
value = strval(tmp);
}else{
return 0;
}
return value;
}
/*
SA-MP Streamer Plugin v2.5.2
Copyright © 2010 Incognito
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://w...content-available-to-author-only...u.org/licenses/>.
*/
#if defined _streamer_included
#endinput
#endif
#define _streamer_included
// Definitions
#define STREAMER_TYPE_OBJECT (0)
#define STREAMER_TYPE_PICKUP (1)
#define STREAMER_TYPE_CP (2)
#define STREAMER_TYPE_RACE_CP (3)
#define STREAMER_TYPE_MAP_ICON (4)
#define STREAMER_TYPE_3D_TEXT_LABEL (5)
#define STREAMER_TYPE_AREA (6)
// Enumerator
enum
{
E_STREAMER_ATTACHED_PLAYER,
E_STREAMER_ATTACHED_VEHICLE,
E_STREAMER_COLOR,
E_STREAMER_DISTANCE,
E_STREAMER_DRAW_DISTANCE,
E_STREAMER_EXTRA_ID,
E_STREAMER_INTERIOR_ID,
E_STREAMER_MAX_X,
E_STREAMER_MAX_Y,
E_STREAMER_MAX_Z,
E_STREAMER_MIN_X,
E_STREAMER_MIN_Y,
E_STREAMER_MIN_Z,
E_STREAMER_MODEL_ID,
E_STREAMER_MOVE_SPEED,
E_STREAMER_MOVE_X,
E_STREAMER_MOVE_Y,
E_STREAMER_MOVE_Z,
E_STREAMER_NEXT_X,
E_STREAMER_NEXT_Y,
E_STREAMER_NEXT_Z,
E_STREAMER_PLAYER_ID,
E_STREAMER_R_X,
E_STREAMER_R_Y,
E_STREAMER_R_Z,
E_STREAMER_SIZE,
E_STREAMER_STYLE,
E_STREAMER_TEST_LOS,
E_STREAMER_TYPE,
E_STREAMER_WORLD_ID,
E_STREAMER_X,
E_STREAMER_Y,
E_STREAMER_Z
}
// Natives (Settings)
native Streamer_TickRate(rate);
native Streamer_MaxItems(type, items);
native Streamer_VisibleItems(type, items);
native Streamer_CellDistance(Float:distance);
native Streamer_CellSize(Float:size);
// Natives (Updates)
native Streamer_Update(playerid);
native Streamer_UpdateEx(playerid, Float:x, Float:y, Float:z);
// Natives (Data Manipulation)
native Streamer_GetFloatData(type, {Text3D,_}:id, data, &Float:result);
native Streamer_SetFloatData(type, {Text3D,_}:id, data, Float:value);
native Streamer_GetIntData(type, {Text3D,_}:id, data);
native Streamer_SetIntData(type, {Text3D,_}:id, data, value);
native Streamer_IsInArrayData(type, {Text3D,_}:id, data, value);
native Streamer_AppendArrayData(type, {Text3D,_}:id, data, value);
native Streamer_RemoveArrayData(type, {Text3D,_}:id, data, value);
native Streamer_GetUpperBound(type);
// Natives (Miscellaneous)
native Streamer_IsItemVisible(playerid, type, {Text3D,_}:id);
native Streamer_DestroyAllVisibleItems(playerid, type);
native Streamer_CountVisibleItems(playerid, type);
// Natives (Objects)
native CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 200.0);
native DestroyDynamicObject(objectid);
native IsValidDynamicObject(objectid);
native SetDynamicObjectPos(objectid, Float:x, Float:y, Float:z);
native GetDynamicObjectPos(objectid, &Float:x, &Float:y, &Float:z);
native SetDynamicObjectRot(objectid, Float:rx, Float:ry, Float:rz);
native GetDynamicObjectRot(objectid, &Float:rx, &Float:ry, &Float:rz);
native MoveDynamicObject(objectid, Float:x, Float:y, Float:z, Float:speed);
native StopDynamicObject(objectid);
native DestroyAllDynamicObjects();
native CountDynamicObjects();
// Natives (Pickups)
native CreateDynamicPickup(modelid, type, Float:x, Float:y, Float:z, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
native DestroyDynamicPickup(pickupid);
native IsValidDynamicPickup(pickupid);
native DestroyAllDynamicPickups();
native CountDynamicPickups();
// Natives (Checkpoints)
native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
native DestroyDynamicCP(checkpointid);
native IsValidDynamicCP(checkpointid);
native TogglePlayerDynamicCP(playerid, checkpointid, toggle);
native TogglePlayerAllDynamicCPs(playerid, toggle);
native IsPlayerInDynamicCP(playerid, checkpointid);
native DestroyAllDynamicCPs();
native CountDynamicCPs();
// Natives (Race Checkpoints)
native CreateDynamicRaceCP(type, Float:x, Float:y, Float:z, Float:nextx, Float:nexty, Float:nextz, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
native DestroyDynamicRaceCP(checkpointid);
native IsValidDynamicRaceCP(checkpointid);
native TogglePlayerDynamicRaceCP(playerid, checkpointid, toggle);
native TogglePlayerAllDynamicRaceCPs(playerid, toggle);
native IsPlayerInDynamicRaceCP(playerid, checkpointid);
native DestroyAllDynamicRaceCPs();
native CountDynamicRaceCPs();
// Natives (Map Icons)
native CreateDynamicMapIcon(Float:x, Float:y, Float:z, type, color, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
native DestroyDynamicMapIcon(iconid);
native IsValidDynamicMapIcon(iconid);
native DestroyAllDynamicMapIcons();
native CountDynamicMapIcons();
// Natives (3D Text Labels)
native Text3D:CreateDynamic3DTextLabel(const text[], color, Float:x, Float:y, Float:z, Float:drawdistance, attachedplayer = INVALID_PLAYER_ID, attachedvehicle = INVALID_VEHICLE_ID, testlos = 0, worldid = -1, interiorid = -1, playerid = -1, Float:distance = 100.0);
native DestroyDynamic3DTextLabel(Text3D:id);
native IsValidDynamic3DTextLabel(Text3D:id);
native UpdateDynamic3DTextLabelText(Text3D:id, color, const text[]);
native DestroyAllDynamic3DTextLabels();
native CountDynamic3DTextLabels();
// Natives (Areas)
native CreateDynamicCircle(Float:x, Float:y, Float:size, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicRectangle(Float:minx, Float:miny, Float:maxx, Float:maxy, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicSphere(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1);
native CreateDynamicCube(Float:minx, Float:miny, Float:minz, Float:maxx, Float:maxy, Float:maxz, worldid = -1, interiorid = -1, playerid = -1);
native DestroyDynamicArea(areaid);
native IsValidDynamicArea(areaid);
native TogglePlayerDynamicArea(playerid, areaid, toggle);
native TogglePlayerAllDynamicAreas(playerid, toggle);
native IsPlayerInDynamicArea(playerid, areaid);
native AttachDynamicAreaToPlayer(areaid, playerid);
native AttachDynamicAreaToVehicle(areaid, vehicleid);
native DestroyAllDynamicAreas();
native CountDynamicAreas();
// Natives (Internals)
native Streamer_AddPlayer(playerid);
native Streamer_RemovePlayer(playerid);
native Streamer_VerifyPickup(playerid, pickupid);
native Streamer_VerifyCheckpoint(playerid, type, status);
native Streamer_RegisterInterface();
// Callbacks
forward OnDynamicObjectMoved(objectid);
forward OnPlayerPickUpDynamicPickup(playerid, pickupid);
forward OnPlayerEnterDynamicCP(playerid, checkpointid);
forward OnPlayerLeaveDynamicCP(playerid, checkpointid);
forward OnPlayerEnterDynamicRaceCP(playerid, checkpointid);
forward OnPlayerLeaveDynamicRaceCP(playerid, checkpointid);
forward OnPlayerEnterDynamicArea(playerid, areaid);
forward OnPlayerLeaveDynamicArea(playerid, areaid);
// Callback Hook Section
static bool:Streamer_g_OPC = false;
static bool:Streamer_g_OPDC = false;
static bool:Streamer_g_OPPP = false;
static bool:Streamer_g_OPEC = false;
static bool:Streamer_g_OPLC = false;
static bool:Streamer_g_OPERC = false;
static bool:Streamer_g_OPLRC = false;
static bool:Streamer_g_RI = false;
public OnFilterScriptInit()
{
if (!Streamer_g_RI)
{
Streamer_g_OPC = funcidx("Streamer_OnPlayerConnect") != -1;
Streamer_g_OPDC = funcidx("Streamer_OnPlayerDisconnect") != -1;
Streamer_g_OPPP = funcidx("Streamer_OnPlayerPickUpPickup") != -1;
Streamer_g_OPEC = funcidx("Streamer_OnPlayerEnterCP") != -1;
Streamer_g_OPLC = funcidx("Streamer_OnPlayerLeaveCP") != -1;
Streamer_g_OPERC = funcidx("Streamer_OnPlayerEnterRaceCP") != -1;
Streamer_g_OPLRC = funcidx("Streamer_OnPlayerLeaveRaceCP") != -1;
Streamer_g_RI = true;
Streamer_RegisterInterface();
}
if (funcidx("Streamer_OnFilterScriptInit") != -1)
{
return CallLocalFunction("Streamer_OnFilterScriptInit", "");
}
return 1;
}
#if defined _ALS_OnFilterScriptInit
#undef OnFilterScriptInit
#else
#define _ALS_OnFilterScriptInit
#endif
#define OnFilterScriptInit Streamer_OnFilterScriptInit
forward Streamer_OnFilterScriptInit();
public OnGameModeInit()
{
if (!Streamer_g_RI)
{
Streamer_g_OPC = funcidx("Streamer_OnPlayerConnect") != -1;
Streamer_g_OPDC = funcidx("Streamer_OnPlayerDisconnect") != -1;
Streamer_g_OPPP = funcidx("Streamer_OnPlayerPickUpPickup") != -1;
Streamer_g_OPEC = funcidx("Streamer_OnPlayerEnterCP") != -1;
Streamer_g_OPLC = funcidx("Streamer_OnPlayerLeaveCP") != -1;
Streamer_g_OPERC = funcidx("Streamer_OnPlayerEnterRaceCP") != -1;
Streamer_g_OPLRC = funcidx("Streamer_OnPlayerLeaveRaceCP") != -1;
Streamer_g_RI = true;
Streamer_RegisterInterface();
}
if (funcidx("Streamer_OnGameModeInit") != -1)
{
return CallLocalFunction("Streamer_OnGameModeInit", "");
}
return 1;
}
#if defined _ALS_OnGameModeInit
#undef OnGameModeInit
#else
#define _ALS_OnGameModeInit
#endif
#define OnGameModeInit Streamer_OnGameModeInit
forward Streamer_OnGameModeInit();
public OnPlayerConnect(playerid)
{
if (!IsPlayerNPC(playerid))
{
Streamer_AddPlayer(playerid);
}
if (Streamer_g_OPC)
{
return CallLocalFunction("Streamer_OnPlayerConnect", "d", playerid);
}
return 1;
}
#if defined _ALS_