From e3b9b7b96655a876d6a5c1cee226201b028dfc88 Mon Sep 17 00:00:00 2001 From: Southclaw Date: Fri, 2 Feb 2018 21:29:24 +0000 Subject: [PATCH] 0.3z-R1 --- a_actor.inc | 34 ------------------------ a_objects.inc | 10 ++------ a_players.inc | 16 +++--------- a_samp.inc | 70 +++++++++----------------------------------------- a_sampdb.inc | 22 +++++----------- a_vehicles.inc | 7 +---- pawn.json | 2 -- 7 files changed, 25 insertions(+), 136 deletions(-) delete mode 100755 a_actor.inc diff --git a/a_actor.inc b/a_actor.inc deleted file mode 100755 index 0289452..0000000 --- a/a_actor.inc +++ /dev/null @@ -1,34 +0,0 @@ -/* SA-MP Actor Functions - * - * (c) Copyright 2015, SA-MP Team - * - */ - -#if defined _actor_included - #endinput -#endif -#define _actor_included -#pragma library actors - -native CreateActor(modelid, Float:X, Float:Y, Float:Z, Float:Rotation); -native DestroyActor(actorid); - -native IsActorStreamedIn(actorid, forplayerid); - -native SetActorVirtualWorld(actorid, vworld); -native GetActorVirtualWorld(actorid); - -native ApplyActorAnimation(actorid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time); -native ClearActorAnimations(actorid); - -native SetActorPos(actorid, Float:X, Float:Y, Float:Z); -native GetActorPos(actorid, &Float:X, &Float:Y, &Float:Z); -native SetActorFacingAngle(actorid, Float:ang); -native GetActorFacingAngle(actorid, &Float:ang); - -native SetActorHealth(actorid, Float:health); -native GetActorHealth(actorid, &Float:health); -native SetActorInvulnerable(actorid, invulnerable = true); -native IsActorInvulnerable(actorid); - -native IsValidActor(actorid); \ No newline at end of file diff --git a/a_objects.inc b/a_objects.inc index 0d93064..f83bda6 100755 --- a/a_objects.inc +++ b/a_objects.inc @@ -1,6 +1,6 @@ /* SA-MP Object Functions * - * (c) Copyright 2005-2015, SA-MP Team + * (c) Copyright 2005-2012, SA-MP Team * */ @@ -20,8 +20,6 @@ native SetObjectPos(objectid, Float:X, Float:Y, Float:Z); native GetObjectPos(objectid, &Float:X, &Float:Y, &Float:Z); native SetObjectRot(objectid, Float:RotX, Float:RotY, Float:RotZ); native GetObjectRot(objectid, &Float:RotX, &Float:RotY, &Float:RotZ); -native GetObjectModel(objectid); -native SetObjectNoCameraCol(objectid); native IsValidObject(objectid); native DestroyObject(objectid); native MoveObject(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0); @@ -37,8 +35,6 @@ 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 GetPlayerObjectModel(playerid, objectid); -native SetPlayerObjectNoCameraCol(playerid, objectid); native IsValidPlayerObject(playerid, objectid); native DestroyPlayerObject(playerid, objectid); native MovePlayerObject(playerid, objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0); @@ -69,6 +65,4 @@ native SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturenam native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0); native SetObjectMaterialText(objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0); -native SetPlayerObjectMaterialText(playerid, objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0); - -native SetObjectsDefaultCameraCol(disable); \ No newline at end of file +native SetPlayerObjectMaterialText(playerid, objectid, text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0); \ No newline at end of file diff --git a/a_players.inc b/a_players.inc index 953dbdb..9ca0678 100755 --- a/a_players.inc +++ b/a_players.inc @@ -1,6 +1,6 @@ /* SA-MP Player Functions * - * (c) Copyright 2005-2015, SA-MP Team + * (c) Copyright 2005-2012, SA-MP Team * */ @@ -78,7 +78,6 @@ native SetPlayerAmmo(playerid, weaponslot, ammo); native GetPlayerAmmo(playerid); native GetPlayerWeaponState(playerid); native GetPlayerTargetPlayer(playerid); -native GetPlayerTargetActor(playerid); native SetPlayerTeam(playerid, teamid); native GetPlayerTeam(playerid); native SetPlayerScore(playerid,score); @@ -177,7 +176,7 @@ native GetPVarType(playerid, varname[]); #define MAX_CHATBUBBLE_LENGTH 144 native SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime); -// Player control +// Player controls native PutPlayerInVehicle(playerid, vehicleid, seatid); native GetPlayerVehicleID(playerid); native GetPlayerVehicleSeat(playerid); @@ -190,7 +189,6 @@ native GetPlayerAnimationIndex(playerid); // return the index of any running app native GetAnimationName(index, animlib[], len1, animname[], len2); // get the animation lib/name for the index native GetPlayerSpecialAction(playerid); native SetPlayerSpecialAction(playerid,actionid); -native DisableRemoteVehicleCollisions(playerid, disable); // Player world/map related native SetPlayerCheckpoint(playerid, Float:x, Float:y, Float:z, Float:size); @@ -222,11 +220,6 @@ native SetCameraBehindPlayer(playerid); native GetPlayerCameraPos(playerid, &Float:x, &Float:y, &Float:z); native GetPlayerCameraFrontVector(playerid, &Float:x, &Float:y, &Float:z); native GetPlayerCameraMode(playerid); -native EnablePlayerCameraTarget(playerid, enable); -native GetPlayerCameraTargetObject(playerid); -native GetPlayerCameraTargetVehicle(playerid); -native GetPlayerCameraTargetPlayer(playerid); -native GetPlayerCameraTargetActor(playerid); native Float:GetPlayerCameraAspectRatio(playerid); native Float:GetPlayerCameraZoom(playerid); native AttachCameraToObject(playerid, objectid); @@ -267,7 +260,4 @@ native StartRecordingPlayerData(playerid, recordtype, recordname[]); native StopRecordingPlayerData(playerid); native SelectTextDraw(playerid, hovercolor); // enables the mouse so the player can select a textdraw -native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mouse - -// Explosion -native CreateExplosionForPlayer(playerid, Float:X, Float:Y, Float:Z, type, Float:Radius); \ No newline at end of file +native CancelSelectTextDraw(playerid); // cancel textdraw selection with the mouse \ No newline at end of file diff --git a/a_samp.inc b/a_samp.inc index f23b38d..1eaf48f 100755 --- a/a_samp.inc +++ b/a_samp.inc @@ -1,6 +1,6 @@ /* SA-MP Functions * - * (c) Copyright 2005-2015, SA-MP Team + * (c) Copyright 2005-2012, SA-MP Team * */ @@ -23,17 +23,14 @@ #include #include #include -#include #include // Limits and internal constants #define MAX_PLAYER_NAME (24) -#define MAX_PLAYERS (1000) +#define MAX_PLAYERS (500) #define MAX_VEHICLES (2000) -#define MAX_ACTORS (1000) #define INVALID_PLAYER_ID (0xFFFF) #define INVALID_VEHICLE_ID (0xFFFF) -#define INVALID_ACTOR_ID (0xFFFF) #define NO_TEAM (255) #define MAX_OBJECTS (1000) #define INVALID_OBJECT_ID (0xFFFF) @@ -61,8 +58,7 @@ 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 SendDeathMessageToPlayer(playerid, killer, killee, weapon); +native SendDeathMessage(killer,killee,weapon); native GameTextForAll(const string[],time,style); native GameTextForPlayer(playerid,const string[],time,style); native SetTimer(funcname[], interval, repeating); @@ -77,31 +73,6 @@ native Float:asin(Float:value); native Float:acos(Float:value); native Float:atan(Float:value); native Float:atan2(Float:x, Float:y); -native GetPlayerPoolSize(); -native GetVehiclePoolSize(); -native GetActorPoolSize(); - -// Hash -native SHA256_PassHash(password[], salt[], ret_hash[], ret_hash_len); // SHA256 for password hashing - -// Server wide persistent variable system (SVars) -native SetSVarInt(varname[], int_value); -native GetSVarInt(varname[]); -native SetSVarString(varname[], string_value[]); -native GetSVarString(varname[], string_return[], len); -native SetSVarFloat(varname[], Float:float_value); -native Float:GetSVarFloat(varname[]); -native DeleteSVar(varname[]); - -// SVar enumeration -#define SERVER_VARTYPE_NONE 0 -#define SERVER_VARTYPE_INT 1 -#define SERVER_VARTYPE_STRING 2 -#define SERVER_VARTYPE_FLOAT 3 - -native GetSVarsUpperIndex(); -native GetSVarNameAtIndex(index, ret_varname[], ret_len); -native GetSVarType(varname[]); // Game native SetGameModeText(const string[]); @@ -109,7 +80,7 @@ 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, addsiren=0); +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); @@ -144,20 +115,12 @@ native Kick(playerid); native Ban(playerid); native BanEx(playerid, const reason[]); native SendRconCommand(command[]); -native GetPlayerNetworkStats(playerid, retstr[], retstr_size); -native GetNetworkStats(retstr[], retstr_size); -native GetPlayerVersion(playerid, const version[], len); // Returns the SA-MP client revision as reported by the player -native BlockIpAddress(ip_address[], timems); -native UnBlockIpAddress(ip_address[]); - -// Deprecated: native GetServerVarAsString(const varname[], buffer[], len); native GetServerVarAsInt(const varname[]); native GetServerVarAsBool(const varname[]); -// These are the same 3 functions as above although they avoid the name ambiguity/conflict with the SVar system. -native GetConsoleVarAsString(const varname[], buffer[], len); -native GetConsoleVarAsInt(const varname[]); -native GetConsoleVarAsBool(const varname[]); +native GetPlayerNetworkStats(playerid, retstr[], retstr_size); +native GetNetworkStats(retstr[], retstr_size); +native GetPlayerVersion(playerid, const version[], len); // Returns the SA-MP client revision as reported by the player // Extended admin network stats native GetServerTickRate(); @@ -235,12 +198,10 @@ native DeletePlayer3DTextLabel(playerid, PlayerText3D:id); native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, text[]); // Player GUI Dialog -#define DIALOG_STYLE_MSGBOX 0 -#define DIALOG_STYLE_INPUT 1 -#define DIALOG_STYLE_LIST 2 -#define DIALOG_STYLE_PASSWORD 3 -#define DIALOG_STYLE_TABLIST 4 -#define DIALOG_STYLE_TABLIST_HEADERS 5 +#define DIALOG_STYLE_MSGBOX 0 +#define DIALOG_STYLE_INPUT 1 +#define DIALOG_STYLE_LIST 2 +#define DIALOG_STYLE_PASSWORD 3 native ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]); @@ -371,7 +332,7 @@ forward OnEnterExitModShop(playerid, enterexit, interiorid); forward OnVehiclePaintjob(playerid, vehicleid, paintjobid); forward OnVehicleRespray(playerid, vehicleid, color1, color2); forward OnVehicleDamageStatusUpdate(vehicleid, playerid); -forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z, Float:vel_x, Float:vel_y, Float:vel_z); +forward OnUnoccupiedVehicleUpdate(vehicleid, playerid, passenger_seat, Float:new_x, Float:new_y, Float:new_z); forward OnPlayerSelectedMenuRow(playerid, row); forward OnPlayerExitedMenu(playerid); forward OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid); @@ -382,19 +343,12 @@ forward OnPlayerStreamIn(playerid, forplayerid); forward OnPlayerStreamOut(playerid, forplayerid); forward OnVehicleStreamIn(vehicleid, forplayerid); forward OnVehicleStreamOut(vehicleid, forplayerid); -forward OnActorStreamIn(actorid, forplayerid); -forward OnActorStreamOut(actorid, forplayerid); forward OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]); forward OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid, bodypart); forward OnPlayerGiveDamage(playerid, damagedid, Float:amount, weaponid, bodypart); -forward OnPlayerGiveDamageActor(playerid, damaged_actorid, Float:amount, weaponid, bodypart); forward OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ); forward OnPlayerClickTextDraw(playerid, Text:clickedid); forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid); -forward OnIncomingConnection(playerid, ip_address[], port); -forward OnTrailerUpdate(playerid, vehicleid); -forward OnVehicleSirenStateChange(playerid, vehicleid, newstate); -forward OnPlayerFinishedDownloading(playerid, virtualworld); #define CLICK_SOURCE_SCOREBOARD 0 forward OnPlayerClickPlayer(playerid, clickedplayerid, source); diff --git a/a_sampdb.inc b/a_sampdb.inc index 00f0366..acb1e56 100755 --- a/a_sampdb.inc +++ b/a_sampdb.inc @@ -1,7 +1,8 @@ -// SA-MP Native SQLite Database Functions -// -// (c) Copyright 2015, SA-MP Team -// + /* SA-MP Native SQLite Database Functions + * + * (c) Copyright 2007, SA-MP Team + * + */ #if defined _sampdb_included #endinput @@ -11,20 +12,11 @@ native DB:db_open(name[]); native db_close(DB:db); -native DBResult:db_query(DB:db, query[]); +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_int(DBResult:result, field = 0); -native Float:db_get_field_float(DBResult:result, field = 0); -native db_get_field_assoc(DBResult:dbresult, const field[], result[], maxlength); -native db_get_field_assoc_int(DBResult:result, const field[]); -native Float:db_get_field_assoc_float(DBResult:result, const field[]); -native db_get_mem_handle(DB:db); -native db_get_result_mem_handle(DBResult:result); - -native db_debug_openfiles(); -native db_debug_openresults(); \ No newline at end of file +native db_get_field_assoc(DBResult:dbresult, const field[], result[], maxlength); \ No newline at end of file diff --git a/a_vehicles.inc b/a_vehicles.inc index 267ff45..ebac749 100755 --- a/a_vehicles.inc +++ b/a_vehicles.inc @@ -30,7 +30,7 @@ #define VEHICLE_PARAMS_ON 1 // Vehicle -native CreateVehicle(vehicletype, Float:x, Float:y, Float:z, Float:rotation, color1, color2, respawn_delay, addsiren=0); +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); @@ -43,11 +43,6 @@ native SetVehicleParamsForPlayer(vehicleid,playerid,objective,doorslocked); native ManualVehicleEngineAndLights(); native SetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective); native GetVehicleParamsEx(vehicleid, &engine, &lights, &alarm, &doors, &bonnet, &boot, &objective); -native GetVehicleParamsSirenState(vehicleid); -native SetVehicleParamsCarDoors(vehicleid, driver, passenger, backleft, backright); -native GetVehicleParamsCarDoors(vehicleid, &driver, &passenger, &backleft, &backright); -native SetVehicleParamsCarWindows(vehicleid, driver, passenger, backleft, backright); -native GetVehicleParamsCarWindows(vehicleid, &driver, &passenger, &backleft, &backright); native SetVehicleToRespawn(vehicleid); native LinkVehicleToInterior(vehicleid, interiorid); native AddVehicleComponent(vehicleid, componentid); diff --git a/pawn.json b/pawn.json index aee5fb5..3c317b9 100755 --- a/pawn.json +++ b/pawn.json @@ -1,7 +1,5 @@ { "user": "sampctl", "repo": "samp-stdlib", - "entry": "test.pwn", - "output": "test.amx", "dependencies": ["sampctl/pawn-stdlib"] }