You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 13, 2024. It is now read-only.
Hi, I have seen that in the discord it shows the name of the map that is currently being played and the link to the map that was already played.
Here is a solution that worked well for me.
Add new handle of array
new Handle:g_MapArray = INVALID_HANDLE;
In OnpluginStart, initiate arrangement
g_MapArray = CreateArray(32);
When the map is finished, save it in the array (with a maximum of 1 map)
public OnMapEnd(){
new String:map[64];
GetCurrentMap(map,sizeof(map));
PushArrayString(g_MapArray,map);
if (GetArraySize(g_MapArray) > 1)
RemoveFromArray(g_MapArray,0);
}
and finally call the last map played
if(StrContains(sBuffer, "%map", false) != -1)
{
if (g_MapArray != INVALID_HANDLE)
{
new MapArray = GetArraySize(g_MapArray)-1;
for (new i=0; i<=MapArray; i++)
{
new String:map[64];
GetArrayString(g_MapArray,i,map,sizeof(map));
ReplaceString(sBuffer, maxlength, "%map", map, false);
}
}
}
With these modifications, the truth is that I am doing super well, I have not had any problems so far.
The text was updated successfully, but these errors were encountered:
Hi, I have seen that in the discord it shows the name of the map that is currently being played and the link to the map that was already played.
Here is a solution that worked well for me.
Add new handle of array
new Handle:g_MapArray = INVALID_HANDLE;
In OnpluginStart, initiate arrangement
g_MapArray = CreateArray(32);
When the map is finished, save it in the array (with a maximum of 1 map)
and finally call the last map played
With these modifications, the truth is that I am doing super well, I have not had any problems so far.
The text was updated successfully, but these errors were encountered: