Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion a_actor.inc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ native IsActorStreamedIn(actorid, forplayerid);
native SetActorVirtualWorld(actorid, vworld);
native GetActorVirtualWorld(actorid);

native ApplyActorAnimation(actorid, animlib[], animname[], Float:fDelta, loop, lockx, locky, freeze, time);
native ApplyActorAnimation(actorid, const animlib[], const animname[], Float:fDelta, loop, lockx, locky, freeze, time);
native ClearActorAnimations(actorid);

native SetActorPos(actorid, Float:X, Float:Y, Float:Z);
Expand Down
2 changes: 1 addition & 1 deletion a_http.inc
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
#define HTTP_ERROR_CONTENT_TOO_BIG 5
#define HTTP_ERROR_MALFORMED_RESPONSE 6

native HTTP(index, type, url[], data[], callback[]);
native HTTP(index, type, const url[], const data[], const callback[]);

// example HTTP callback: public MyHttpResponse(index, response_code, data[]) { ... }
10 changes: 5 additions & 5 deletions a_npc.inc
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@
native print(const string[]);
native printf(const format[], {Float,_}:...);
native format(output[], len, const format[], {Float,_}:...);
native SetTimer(funcname[], interval, repeating);
native SetTimer(const funcname[], interval, repeating);
native KillTimer(timerid);
native GetTickCount();
native Float:asin(Float:value);
native Float:acos(Float:value);
native Float:atan(Float:value);
native Float:atan2(Float:x, Float:y);

native SendChat(msg[]);
native SendCommand(commandtext[]);
native SendChat(const msg[]);
native SendCommand(const commandtext[]);

native GetPlayerState(playerid);
native GetPlayerPos(playerid, &Float:x, &Float:y, &Float:z);
Expand All @@ -57,14 +57,14 @@ native SetMyFacingAngle(Float:ang);
native GetDistanceFromMeToPoint(Float:X, Float:Y, Float:Z, &Float:Distance);
native IsPlayerInRangeOfPoint(playerid, Float:range, Float:X, Float:Y, Float:Z);

native GetPlayerName(playerid, const name[], len);
native GetPlayerName(playerid, name[], len);
native IsPlayerConnected(playerid);

#define PLAYER_RECORDING_TYPE_NONE 0
#define PLAYER_RECORDING_TYPE_DRIVER 1
#define PLAYER_RECORDING_TYPE_ONFOOT 2

native StartRecordingPlayback(playbacktype, recordname[]);
native StartRecordingPlayback(playbacktype, const recordname[]);
native StopRecordingPlayback();
native PauseRecordingPlayback();
native ResumeRecordingPlayback();
Expand Down
8 changes: 4 additions & 4 deletions a_objects.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ native AttachPlayerObjectToPlayer(objectplayer, objectid, attachplayer, Float:Of
#define OBJECT_MATERIAL_TEXT_ALIGN_CENTER 1
#define OBJECT_MATERIAL_TEXT_ALIGN_RIGHT 2

native SetObjectMaterial(objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0);
native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, txdname[], texturename[], materialcolor=0);
native SetObjectMaterial(objectid, materialindex, modelid, const txdname[], const texturename[], materialcolor=0);
native SetPlayerObjectMaterial(playerid, objectid, materialindex, modelid, const txdname[], const 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 SetObjectMaterialText(objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);
native SetPlayerObjectMaterialText(playerid, objectid, const text[], materialindex = 0, materialsize = OBJECT_MATERIAL_SIZE_256x128, const fontface[] = "Arial", fontsize = 24, bold = 1, fontcolor = 0xFFFFFFFF, backcolor = 0, textalignment = 0);

native SetObjectsDefaultCameraCol(disable);
32 changes: 16 additions & 16 deletions a_players.inc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ native GetPlayerIp(playerid, name[], len);
native GetPlayerPing(playerid);
native GetPlayerWeapon(playerid);
native GetPlayerKeys(playerid, &keys, &updown, &leftright);
native GetPlayerName(playerid, const name[], len);
native GetPlayerName(playerid, name[], len);
native SetPlayerTime(playerid, hour, minute);
native GetPlayerTime(playerid, &hour, &minute);
native TogglePlayerClock(playerid, toggle);
Expand All @@ -116,9 +116,9 @@ 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 PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native PlayAudioStreamForPlayer(playerid, const url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0);
native StopAudioStreamForPlayer(playerid);
native SetPlayerShopName(playerid, shopname[]);
native SetPlayerShopName(playerid, const shopname[]);
native SetPlayerSkillLevel(playerid, skill, level);
native GetPlayerSurfingVehicleID(playerid);
native GetPlayerSurfingObjectID(playerid);
Expand All @@ -135,7 +135,7 @@ native IsPlayerAttachedObjectSlotUsed(playerid, index);
native EditAttachedObject(playerid, index);

// Per-player TextDraws
native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, text[]);
native PlayerText:CreatePlayerTextDraw(playerid, Float:x, Float:y, const text[]);
native PlayerTextDrawDestroy(playerid, PlayerText:text);
native PlayerTextDrawLetterSize(playerid, PlayerText:text, Float:x, Float:y);
native PlayerTextDrawTextSize(playerid, PlayerText:text, Float:x, Float:y);
Expand All @@ -151,19 +151,19 @@ native PlayerTextDrawSetProportional(playerid, PlayerText:text, set);
native PlayerTextDrawSetSelectable(playerid, PlayerText:text, set);
native PlayerTextDrawShow(playerid, PlayerText:text);
native PlayerTextDrawHide(playerid, PlayerText:text);
native PlayerTextDrawSetString(playerid, PlayerText:text, string[]);
native PlayerTextDrawSetString(playerid, PlayerText:text, const string[]);
native PlayerTextDrawSetPreviewModel(playerid, PlayerText:text, modelindex);
native PlayerTextDrawSetPreviewRot(playerid, PlayerText:text, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fZoom = 1.0);
native PlayerTextDrawSetPreviewVehCol(playerid, PlayerText:text, color1, color2);

// Per-player variable system (PVars)
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[]);
native SetPVarInt(playerid, const varname[], int_value);
native GetPVarInt(playerid, const varname[]);
native SetPVarString(playerid, const varname[], const string_value[]);
native GetPVarString(playerid, const varname[], string_return[], len);
native SetPVarFloat(playerid, const varname[], Float:float_value);
native Float:GetPVarFloat(playerid, const varname[]);
native DeletePVar(playerid, const varname[]);

// PVar enumeration
#define PLAYER_VARTYPE_NONE 0
Expand All @@ -173,10 +173,10 @@ native DeletePVar(playerid, varname[]);

native GetPVarsUpperIndex(playerid);
native GetPVarNameAtIndex(playerid, index, ret_varname[], ret_len);
native GetPVarType(playerid, varname[]);
native GetPVarType(playerid, const varname[]);

#define MAX_CHATBUBBLE_LENGTH 144
native SetPlayerChatBubble(playerid, text[], color, Float:drawdistance, expiretime);
native SetPlayerChatBubble(playerid, const text[], color, Float:drawdistance, expiretime);

// Player control
native PutPlayerInVehicle(playerid, vehicleid, seatid);
Expand All @@ -185,7 +185,7 @@ 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 ApplyAnimation(playerid, const animlib[], const 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
Expand Down Expand Up @@ -264,7 +264,7 @@ native PlayerSpectateVehicle(playerid, targetvehicleid, mode = SPECTATE_MODE_NOR
#define PLAYER_RECORDING_TYPE_DRIVER 1
#define PLAYER_RECORDING_TYPE_ONFOOT 2

native StartRecordingPlayerData(playerid, recordtype, recordname[]);
native StartRecordingPlayerData(playerid, recordtype, const recordname[]);
native StopRecordingPlayerData(playerid);

native SelectTextDraw(playerid, hovercolor); // enables the mouse so the player can select a textdraw
Expand Down
56 changes: 28 additions & 28 deletions a_samp.inc
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ native SendDeathMessage(killer, killee, weapon);
native SendDeathMessageToPlayer(playerid, 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 SetTimer(const funcname[], interval, repeating);
native SetTimerEx(const funcname[], interval, repeating, const format[], {Float,_}:...);
native KillTimer(timerid);
native GetTickCount();
native GetMaxPlayers();
Expand All @@ -82,16 +82,16 @@ native GetVehiclePoolSize();
native GetActorPoolSize();

// Hash
native SHA256_PassHash(password[], salt[], ret_hash[], ret_hash_len); // SHA256 for password hashing
native SHA256_PassHash(const password[], const 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[]);
native SetSVarInt(const varname[], int_value);
native GetSVarInt(const varname[]);
native SetSVarString(const varname[], const string_value[]);
native GetSVarString(const varname[], string_return[], len);
native SetSVarFloat(const varname[], Float:float_value);
native Float:GetSVarFloat(const varname[]);
native DeleteSVar(const varname[]);

// SVar enumeration
#define SERVER_VARTYPE_NONE 0
Expand All @@ -101,7 +101,7 @@ native DeleteSVar(varname[]);

native GetSVarsUpperIndex();
native GetSVarNameAtIndex(index, ret_varname[], ret_len);
native GetSVarType(varname[]);
native GetSVarType(const varname[]);

// Game
native SetGameModeText(const string[]);
Expand All @@ -117,7 +117,7 @@ native ShowNameTags(show);
native ShowPlayerMarkers(mode);
native GameModeExit();
native SetWorldTime(hour);
native GetWeaponName(weaponid, const weapon[], len);
native GetWeaponName(weaponid, weapon[], len);
native EnableTirePopping(enable); // deprecated function
native EnableVehicleFriendlyFire();
native AllowInteriorWeapons(allow);
Expand All @@ -135,32 +135,32 @@ native LimitGlobalChatRadius(Float:chat_radius);
native LimitPlayerMarkerRadius(Float:marker_radius);

// Npc
native ConnectNPC(name[], script[]);
native ConnectNPC(const name[], const script[]);
native IsPlayerNPC(playerid);

// Artwork/NetModels
#define DOWNLOAD_REQUEST_EMPTY 0
#define DOWNLOAD_REQUEST_MODEL_FILE 1
#define DOWNLOAD_REQUEST_TEXTURE_FILE 2

native AddCharModel(baseid, newid, dffname[], txdname[]);
native AddSimpleModel(virtualworld, baseid, newid, dffname[], txdname[]);
native AddSimpleModelTimed(virtualworld, baseid, newid, dffname[], txdname[], timeon, timeoff);
native AddCharModel(baseid, newid, const dffname[], const txdname[]);
native AddSimpleModel(virtualworld, baseid, newid, const dffname[], const txdname[]);
native AddSimpleModelTimed(virtualworld, baseid, newid, const dffname[], const txdname[], timeon, timeoff);
native FindModelFileNameFromCRC(crc, retstr[], retstr_size);
native FindTextureFileNameFromCRC(crc, retstr[], retstr_size);
native RedirectDownload(playerid, url[]);
native RedirectDownload(playerid, const url[]);

// Admin
native IsPlayerAdmin(playerid);
native Kick(playerid);
native Ban(playerid);
native BanEx(playerid, const reason[]);
native SendRconCommand(command[]);
native SendRconCommand(const 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[]);
native GetPlayerVersion(playerid, version[], len); // Returns the SA-MP client revision as reported by the player
native BlockIpAddress(const ip_address[], timems);
native UnBlockIpAddress(const ip_address[]);

// Deprecated:
native GetServerVarAsString(const varname[], buffer[], len);
Expand Down Expand Up @@ -199,7 +199,7 @@ native Menu:GetPlayerMenu(playerid);
#define TEXT_DRAW_FONT_SPRITE_DRAW 4
#define TEXT_DRAW_FONT_MODEL_PREVIEW 5

native Text:TextDrawCreate(Float:x, Float:y, text[]);
native Text:TextDrawCreate(Float:x, Float:y, const text[]);
native TextDrawDestroy(Text:text);
native TextDrawLetterSize(Text:text, Float:x, Float:y);
native TextDrawTextSize(Text:text, Float:x, Float:y);
Expand All @@ -217,7 +217,7 @@ native TextDrawShowForPlayer(playerid, Text:text);
native TextDrawHideForPlayer(playerid, Text:text);
native TextDrawShowForAll(Text:text);
native TextDrawHideForAll(Text:text);
native TextDrawSetString(Text:text, string[]);
native TextDrawSetString(Text:text, const string[]);
native TextDrawSetPreviewModel(Text:text, modelindex);
native TextDrawSetPreviewRot(Text:text, Float:fRotX, Float:fRotY, Float:fRotZ, Float:fZoom = 1.0);
native TextDrawSetPreviewVehCol(Text:text, color1, color2);
Expand All @@ -235,16 +235,16 @@ native GangZoneStopFlashForPlayer(playerid, zone);
native GangZoneStopFlashForAll(zone);

// Global 3D Text Labels
native Text3D:Create3DTextLabel(text[], color, Float:X, Float:Y, Float:Z, Float:DrawDistance, virtualworld, testLOS=0);
native Text3D:Create3DTextLabel(const 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 Update3DTextLabelText(Text3D:id, color, const text[]);

// Per-player 3D Text Labels
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 PlayerText3D:CreatePlayer3DTextLabel(playerid, const 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 UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, const text[]);

// Player GUI Dialog
#define DIALOG_STYLE_MSGBOX 0
Expand All @@ -254,7 +254,7 @@ native UpdatePlayer3DTextLabelText(playerid, PlayerText3D:id, color, text[]);
#define DIALOG_STYLE_TABLIST 4
#define DIALOG_STYLE_TABLIST_HEADERS 5

native ShowPlayerDialog(playerid, dialogid, style, caption[], info[], button1[], button2[]);
native ShowPlayerDialog(playerid, dialogid, style, const caption[], const info[], const button1[], const button2[]);

// --------------------------------------------------
// Defines
Expand Down
4 changes: 2 additions & 2 deletions a_sampdb.inc
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
#define _sampdb_included
#pragma library sampdb

native DB:db_open(name[]);
native DB:db_open(const name[]);
native db_close(DB:db);
native DBResult:db_query(DB:db, query[]);
native DBResult:db_query(DB:db, const query[]);
native db_free_result(DBResult:dbresult);
native db_num_rows(DBResult:dbresult);
native db_next_row(DBResult:dbresult);
Expand Down
2 changes: 1 addition & 1 deletion a_vehicles.inc
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ native AttachTrailerToVehicle(trailerid, vehicleid);
native DetachTrailerFromVehicle(vehicleid);
native IsTrailerAttachedToVehicle(vehicleid);
native GetVehicleTrailer(vehicleid);
native SetVehicleNumberPlate(vehicleid, numberplate[]);
native SetVehicleNumberPlate(vehicleid, const numberplate[]);
native GetVehicleModel(vehicleid);
native GetVehicleComponentInSlot(vehicleid, slot); // There is 1 slot for each CARMODTYPE_*
native GetVehicleComponentType(component); // Find CARMODTYPE_* for component id
Expand Down