Skip to content

Commit

Permalink
Merge pull request #58 from Pottus/inprogress
Browse files Browse the repository at this point in the history
1.9a
  • Loading branch information
Crayder authored Dec 6, 2017
2 parents 7a5dfb9 + 03ff5bf commit 8f43af7
Show file tree
Hide file tree
Showing 15 changed files with 310 additions and 342 deletions.
Binary file modified filterscripts/tstudio.amx
Binary file not shown.
14 changes: 8 additions & 6 deletions filterscripts/tstudio/tsmain.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ public OnFilterScriptInit()
ThemeDataDB = db_open_persistent("tstudio/themedata.db");
sqlite_ThemeSetup();
sqlite_LoadBindString();

ResetSettings();
return 1;
}

Expand Down Expand Up @@ -2001,7 +2003,7 @@ YCMD:loadmap(playerid, arg[], help)
ClearRemoveBuildings();

// Reset settings
//ResetSettings();
ResetSettings();

// Load map
LoadMap(playerid);
Expand Down Expand Up @@ -2083,12 +2085,12 @@ LoadMap(playerid)

// Map is now open
EditMap = db_open_persistent(MapName);

// Perform any version updates
sqlite_UpdateDB();

// Load the maps settings
sqlite_LoadSettings();

// Perform any version updates
sqlite_UpdateDB();

// Load the maps remove buildings
new rmcount = sqlite_LoadRemoveBuildings();
Expand Down Expand Up @@ -2117,7 +2119,7 @@ LoadMap(playerid)
if(MapSetting[mLastEdit])
{
SendClientMessage(playerid, STEALTH_GREEN, sprintf("This map was created by %s.", MapSetting[mAuthor]));
SendClientMessage(playerid, STEALTH_GREEN, sprintf("This map was last edited on %s by %s.", timestr));
SendClientMessage(playerid, STEALTH_GREEN, sprintf("This map was last edited on %s.", timestr)); // by %s
}

// Update the maps settings, so the last edit time updates
Expand Down Expand Up @@ -2337,7 +2339,7 @@ NewMap(playerid)
// Set map default settings
MapSetting[mVersion] = TS_VERSION;
MapSetting[mLastEdit] = gettime();
format(MapSetting[mAuthor], MAX_PLAYER_NAME, "%s", ReturnPlayerName(playerid));
GetPlayerName(playerid, MapSetting[mAuthor], MAX_PLAYER_NAME);
MapSetting[mSpawn][xPos] = 0.0;
MapSetting[mSpawn][yPos] = 0.0;
MapSetting[mSpawn][zPos] = 0.0;
Expand Down
7 changes: 7 additions & 0 deletions filterscripts/tstudio/validmodels.pwn
Original file line number Diff line number Diff line change
Expand Up @@ -2380,5 +2380,12 @@ stock IsUnListedValidModel(modelid)
{
return 1;
}

//0.3.8 support
if(-30000 < modelid <= -2000)
{
return 1;
}

return 0;
}
1 change: 1 addition & 0 deletions models/artconfig.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
AddSimpleModel(-1,19379, -2000, "wallzzz.dff", "wallzzz.txd");
Binary file added models/wallzzz.dff
Binary file not shown.
Binary file added models/wallzzz.txd
Binary file not shown.
3 changes: 2 additions & 1 deletion pawno/include/a_players.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SA-MP Player Functions
*
* (c) Copyright 2005-2015, SA-MP Team
* (c) Copyright 2005-2017, SA-MP Team
*
*/

Expand Down Expand Up @@ -89,6 +89,7 @@ native SetPlayerColor(playerid,color);
native GetPlayerColor(playerid);
native SetPlayerSkin(playerid, skinid);
native GetPlayerSkin(playerid);
native GetPlayerCustomSkin(playerid);
native GivePlayerWeapon(playerid, weaponid, ammo);
native ResetPlayerWeapons(playerid);
native SetPlayerArmedWeapon(playerid, weaponid);
Expand Down
20 changes: 17 additions & 3 deletions pawno/include/a_samp.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SA-MP Functions
*
* (c) Copyright 2005-2015, SA-MP Team
* (c) Copyright 2005-2017, SA-MP Team
*
*/

Expand Down Expand Up @@ -35,7 +35,7 @@
#define INVALID_VEHICLE_ID (0xFFFF)
#define INVALID_ACTOR_ID (0xFFFF)
#define NO_TEAM (255)
#define MAX_OBJECTS (1000)
#define MAX_OBJECTS (2000)
#define INVALID_OBJECT_ID (0xFFFF)
#define MAX_GANG_ZONES (1024)
#define MAX_TEXT_DRAWS (2048)
Expand Down Expand Up @@ -127,7 +127,7 @@ 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 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
Expand All @@ -138,6 +138,18 @@ native LimitPlayerMarkerRadius(Float:marker_radius);
native ConnectNPC(name[], 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 FindModelFileNameFromCRC(crc, retstr[], retstr_size);
native FindTextureFileNameFromCRC(crc, retstr[], retstr_size);
native RedirectDownload(playerid, url[]);

// Admin
native IsPlayerAdmin(playerid);
native Kick(playerid);
Expand Down Expand Up @@ -394,6 +406,8 @@ forward OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid);
forward OnIncomingConnection(playerid, ip_address[], port);
forward OnTrailerUpdate(playerid, vehicleid);
forward OnVehicleSirenStateChange(playerid, vehicleid, newstate);
forward OnPlayerFinishedDownloading(playerid, virtualworld);
forward OnPlayerRequestDownload(playerid, type, crc);

#define CLICK_SOURCE_SCOREBOARD 0
forward OnPlayerClickPlayer(playerid, clickedplayerid, source);
Expand Down
10 changes: 7 additions & 3 deletions pawno/include/crashdetect.inc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2013-2014 Zeex
// Copyright (c) 2013-2015 Zeex
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -27,10 +27,14 @@
#endif
#define CRASHDETECT_INC

native PrintAmxBacktrace();
// Backwards compatibility; will be removed in the future.
#define PrintAmxBacktrace PrintBacktrace
#define GetAmxBacktrace GetBacktrace

native PrintBacktrace();
native PrintNativeBacktrace();

native GetAmxBacktrace(string[], size = sizeof(string));
native GetBacktrace(string[], size = sizeof(string));
native GetNativeBacktrace(string[], size = sizeof(string));

forward OnRuntimeError(code, &bool:suppress);
Expand Down
Loading

0 comments on commit 8f43af7

Please sign in to comment.