Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,987
» Latest member: nguyenhoangphi2124471
» Forum threads: 2,415
» Forum posts: 12,336

Full Statistics

Online Users
There are currently 252 online users.
» 0 Member(s) | 250 Guest(s)
Bing, Google

Latest Threads
Las Venturas Gang Wars - ...
Forum: Advertisements
Last Post: lvgwgta
Yesterday, 11:17 AM
» Replies: 0
» Views: 31
Atlanta DeathMatch/Team D...
Forum: Advertisements
Last Post: NixaSha
2026-03-10, 04:57 AM
» Replies: 1
» Views: 68
mysql_samp
Forum: Plugins
Last Post: NullSablex
2026-03-10, 03:33 AM
» Replies: 0
» Views: 63
backtrace
Forum: Questions and Suggestions
Last Post: Lyvex
2026-03-09, 06:32 AM
» Replies: 0
» Views: 51
Open Multiplayer ✅ loggin...
Forum: Pawn Scripting
Last Post: walid_dz
2026-03-05, 04:19 AM
» Replies: 0
» Views: 135
Argonath RPG SA:MP Reviva...
Forum: Advertisements
Last Post: Melon_Sam
2026-03-03, 06:37 PM
» Replies: 1
» Views: 180
RevolutionX Since (2008) ...
Forum: Advertisements
Last Post: DerekZ905
2026-03-02, 02:46 PM
» Replies: 0
» Views: 101
Consulta warning mismatch...
Forum: Programaci?n
Last Post: carlosmcgrimes
2026-03-01, 04:26 PM
» Replies: 1
» Views: 169
MAP Hot Loader / Map Mana...
Forum: Libraries
Last Post: selmir.beha
2026-02-28, 05:13 AM
» Replies: 0
» Views: 102
[Request] Linko Gaming Ro...
Forum: General Discussions
Last Post: lyly19
2026-02-25, 04:30 AM
» Replies: 1
» Views: 781

 
Star Help with a loop
Posted by: Neckiy - 2025-01-05, 03:47 PM - Forum: Pawn Scripting - Replies (3)

So I feel very stupid right now but can somebody help me with this problem.

I'm making a loop which loads the mysql database data for my admin system.

Code:
#define MAX_ADMINS 25

public OnGameModeInit() {
handle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASSWORD, MYSQL_DATABASE);

new query[128];
for(new i = 0; i < MAX_ADMINS; i++) {
mysql_format(handle, query, sizeof(query), "SELECT * FROM admini WHERE Slot='%d'", i);
mysql_tquery(handle, query, "OnAdminLoad", "i", i);
}

return 1;
}

forward OnAdminLoad(i);
public OnAdminLoad(i) {
if(cache_num_rows() > 0) {
cache_get_value(0, "Ime", AdminInfo[i+1][aIme], 25);     // THIS IS WHERE THE ERROR OCCURS
cache_get_value_int(0, "MinNeaktivnost", AdminInfo[i+1][aMinNeaktivnost]);
cache_get_value_int(0, "Neaktivnost", AdminInfo[i+1][aNeaktivnost]);
cache_get_value_int(0, "Zauzeto", AdminInfo[i+1][aZauzeto]);
cache_get_value_int(0, "Level", AdminInfo[i+1][aLevel]);
cache_get_value(0, "ImeLevel", AdminInfo[i+1][aImeLevel], 32);
} else {
print("Ucitavanje Admin Databaze nije uspelo.");
}
return true;
}

The error I get is:

[debug] Run time error 4: "Array index out of bounds"
[2025-01-05T16:46:11+0100] [Info] [debug]  Attempted to read/write array element at index 25 in array of size 25
[2025-01-05T16:46:11+0100] [Info] [debug] AMX backtrace:
[2025-01-05T16:46:11+0100] [Info] [debug] #0 000243c8 in public OnAdminLoad (i=24) at C:\Users\neman\Desktop\openmp server\gamemodes\skripta.pwn:120

Even though the loop loops from 0 to 24 and then I load it "i+1" because in my database, the Admin Slots are from 1 to 25?

Can somebody explain where the problem is?


  SAMP/OMP Discord - Help us hit 35k users!
Posted by: Potassium - 2025-01-05, 09:52 AM - Forum: General Discussions - No Replies

Hi all,

I think most of us are in the Discord server already, but thought I would remind everyone on the forums that it exists just in case :)

Our Discord server has:

👥 Almost 35,000 users 
- A good combination of veteran SA-MP players and new players - find old friends who you used to play with, and make new ones!
- Players from all different servers and all different countries - lots of old players from popular servers!
- SA-related channels
- Casual/off-topic chat channels
- VIP channels
- Channels to showcase your creations (both SA and non-SA!)
- open.mp development log channel
- Server advertisements
- Dedicated channels for each spoken language to meet people from your own countries

📰 The most up-to-date information on open.mp
- Announcements
- News and updates
- Releases
- Development log
- Real-time feedback from open.mp partners

🆘 Support channels
- open.mp support
- SA-MP support
- GTA SA support
- Pawn/scripting support
- Other software dev support
- Tech support

Come and hang out! :)

http://discord.com/samp


Question [DOUBT] Is there a way or mod to count the hours of open mp on steam?
Posted by: souls - 2025-01-04, 02:01 AM - Forum: Support - No Replies

I have the game purchased on steam and I want you to count the hours played on open mp.


Question [DUDA] ¿Hay alguna forma o mod para contar las horas de open mp en steam?
Posted by: souls - 2025-01-04, 01:58 AM - Forum: Discusi?n GTA SA Multijugador - No Replies

Tengo el juego comprado en steam y quiero que me cuente las horas jugadas en open mp.


  Open Roleplay | AI Actors (2.0)
Posted by: Corne - 2025-01-03, 06:31 PM - Forum: Videos and Screenshots - No Replies

Started out with some actors that had the ability to talk back to the player like in this video:
[Video: https://www.youtube.com/watch?v=ZoWpUR5I7V8]

Now, in the latest update, the actors can also use commands such as /me and /do to roleplay, and they can also interact with other actors. It needs more work to be stable, but for now I'm using it to make the login/registration screen more interesting.

[Video: https://www.youtube.com/watch?v=RMHRkCpbA9A]

Right now, it's still a work in progress, I'm not confident enough to let players interact with it because it is still somewhat unstable and can break down and become gibberish (even now it still isn't always perfect), but if I can get this to a more stable state, I could see so many interesting possibilities for interactions with actors/NPCs, especially in a roleplay setting. Imagine going to the store and literally telling the actor what you want, or going to a car dealership and talking to the salesman, or even needing to do an actual interview for a job, and the actor can hire you based on that interview. So many possibilities.


  Vehicle Streamer
Posted by: Vornex - 2025-01-02, 09:10 AM - Forum: Filterscripts - No Replies

This filterscript loads vehicles from files and streams them. It loads vehicle data from files, then creates vehicles when they are in range of a player and destroys them when no player is in range. It also updates vehicle data when they are spawned.
GitHub Link: https://github.com/Kingvornex/SA-MP-Open...lterScript


  Toggleable HUD / Underground MP changes
Posted by: Corne - 2025-01-01, 09:52 PM - Forum: Questions and Suggestions - Replies (1)

So, my main suggestion was that it would be very nice to be able to toggle the HUD (cash, health, weapon, minimap, etc). Underground Multiplayer has done this in the past as an extension to SA-MP as well.

But then I was thinking, while we're at it, why not look into all the changes that Underground MP did? Other changes like being able to give cars any color you want are pretty amazing too. Has there ever been any communication from the Open MP team with the former Underground MP dev team about this?

It would/could break compatibility with SA-MP clients, but this could be a config setting like 0.3.7 compatibility, right?


  Open Roleplay | Biome Generator V3
Posted by: Corne - 2025-01-01, 09:24 PM - Forum: Videos and Screenshots - No Replies

I've posted some videos and photos of this in the past, but after many years I've picked up on this project again for my upcoming roleplaying server.

Current history so far:
V1: Was written in PAWN, world generation took 30 - 60 minutes and during that time you couldn't join the server.
V2: Was written in .NET using spaghetti code, world generation took roughly 15 minutes and during that time you could play on the server and see it happen in front of you, see Young Fir Forest & Dense Fir Forest video.
V3: Fully refactored the code in .NET and made it organized, clean and now partially supports multi-threading. World generation now takes roughly 100 seconds, does give a bit of a lag spike on the server while it is generating.

Little disclaimer: This is not yet actually for the entire world. Red County and Whetstone are near fully implemented, Flint County and Bone County still have to be done. I also have plans to add way more biomes in the future, and even underwater biomes, all of which will increase the generation time.

[Video: https://www.youtube.com/watch?v=fF0cSdKCPnw]
[Video: https://www.youtube.com/watch?v=0Q5gp7N4M0M]
[Video: https://www.youtube.com/watch?v=KvREbFi6sb0]
[Video: https://www.youtube.com/watch?v=c5YGdkrZHsE]

I also have plans for a V4 in the future. I believe I can get the world generation time down even more, but for now I am satisfied and working on other more important features for the server. The biome generator is not just meant to be a gimmick but have an actual purpose for RPG elements like crafting, gathering, hunting, woodcutting, mining, etc.


  ayuda con sistema de zonas
Posted by: Nikolay_Staggs - 2024-12-31, 07:40 AM - Forum: Programaci?n - No Replies

hola amigos me preguntaba si me podían pasarme un sistema de conquistar zonas basico como no le entiendo aun me cerbiria mucho plis lo cambio por otro sistema que tenga tengo robo a banco tengo sistema vip tengo sistema cambiar color Random a un vehiculo tengo sistema de bombas de aera lo cambio por una de esas solo necesito el sistema de conquistar zonas plis


  Problema con sistema de casa
Posted by: Nikolay_Staggs - 2024-12-28, 09:50 AM - Forum: Programaci?n - Replies (2)

tengo un problema con mi sistema de casas por ejemplo compro la casa ID 0 y la ID 1 bueno entro a la ID 1 y cuando salGO de la ID 1 salgo en la ID 0 no se si es porque mi servidor TDM

CMD:entrar(jugador, params[])
{
para (new i = 0; i < MAX_PROPERTY; i++) //- Sistema de casas
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, INFO_PROPERTY[i][p_POS_EXT][0], INFO_PROPERTY[i][p_POS_EXT][1], INFO_PROPERTY[i][p_POS_EXT][2]))
{
    if(INFO_PROPERTY[i][p_CLOSED] == 0)
    {
¡¡¡¡si(INFO_PROPERTY[i][p_BOUGHT] == 1 && !strcmp(PlayerName(playerid), INFO_PROPERTY[i][p_OWNER]))
{
SetPlayerPosEx(playerid, INFO_PROPERTY[i][p_POS_INT][0], INFO_PROPERTY[i][p_POS_INT][1], INFO_PROPERTY[i][p_POS_INT][2], 0.0, INFO_PROPERTY[i][p_INTERIOR], i+10);
TEMPORAL_PLAYER[playerid][t_AT_HOME] = i;
    SetCameraBehindPlayer(jugador);
    TogglePlayerControlable(reproductor, falso);
GameTextForPlayer(jugador, "~g~Cargando~n~ ~w~~h~~h~Objetos", 3000, 1);
TEMPORAL_PLAYER[playerid][t_TIMER][2] = SetTimerEx("RemoverObjectos", 3000, false, "i", playerid);
regreso 1;
}
otra cosa
{
    ShowPlayerMessage(jugador, "~y~No eres el dueño de esta propiedad", 3);
}
}
otra cosa
{
    ShowPlayerMessage(jugador, "~r~Cerrado", 3);
}
regreso 1;
}
}
regreso 1;
}


CMD:salir(jugador, params[])
{

para (new i = 0; i < MAX_PROPERTY; i++) //- Sistema de casas

{

if(IsPlayerInRangeOfPoint(playerid, 1.0, INFO_PROPERTY[i][p_POS_INT][0], INFO_PROPERTY[i][p_POS_INT][1], INFO_PROPERTY[i][p_POS_INT][2]))

{

SetPlayerPosEx(playerid, INFO_PROPERTY[i][p_POS_EXT][0], INFO_PROPERTY[i][p_POS_EXT][1], INFO_PROPERTY[i][p_POS_EXT][2], 0.0, 0, 0);

TEMPORAL_PLAYER[playerid][t_AT_HOME] = -1;

    SetCameraBehindPlayer(jugador);

    TogglePlayerControlable(reproductor, falso);

GameTextForPlayer(jugador, "~g~Cargando~n~ ~w~~h~~h~Objetos", 3000, 1);

TEMPORAL_PLAYER[playerid][t_TIMER][2] = SetTimerEx("RemoverObjectos", 3000, false, "i", playerid);

regreso 1;

}

}

regreso 1;
}

CMD:crearcasa(jugador, params[])
{
nuevo tipo, precio, str[250];
if(sscanf(params, "dd", type, price)) volver SendClientMessage(playerid, -1, "Syntax: /crearcasa [tipo de casa] [price]");
¿si (tipo < 1 || tipo > 5) devolver SendClientMessage(playerid, -1, "Las casas est?n entre 1 y 5 espacios.");
  para (nuevo cid = 0; cid < MAX_PROPERTY; cid++)
{
¡si (!INFO_PROPERTY[cid][p_TIPO])
{
    GetPlayerPos(playerid, INFO_PROPERTY[cid][p_POS_EXT][0], INFO_PROPERTY[cid][p_POS_EXT][1], INFO_PROPERTY[cid][p_POS_EXT][2])
    INFO_PROPERTY[cid][p_TYPE] = tipo;
    INFO_PROPERTY[cid][p_BOUGHT] = 0;
    INFO_PROPERTY[cid][p_CERRADO] = 0;
switch(tipo)
{
    caso 1:
    {
INFO_PROPERTY[cid][p_POS_INT][0] = 446.7660;
INFO_PROPERTY[cid][p_POS_INT][1] = 507.1065;
INFO_PROPERTY[cid][p_POS_INT][2] = 1001.4206;
INFO_PROPERTY[cid][p_PRICE] = precio;
INFO_PROPERTY[cid][p_INTERIOR] = 12;
    }
    caso 2:
    {
INFO_PROPERTY[cid][p_POS_INT][0] = 2495.9719;
INFO_PROPERTY[cid][p_POS_INT][1] = -1693.5554;
INFO_PROPERTY[cid][p_POS_INT][2] = 1014.8061;
INFO_PROPERTY[cid][p_PRICE] = precio;
INFO_PROPERTY[cid][p_INTERIOR] = 3;
    }
    caso 3:
    {
INFO_PROPERTY[cid][p_POS_INT][0] = 2455.6968;
INFO_PROPERTY[cid][p_POS_INT][1] = -1698.3298;
INFO_PROPERTY[cid][p_POS_INT][2] = 1013.5068;
INFO_PROPERTY[cid][p_PRICE] = precio;
INFO_PROPERTY[cid][p_INTERIOR] = 2;
    }
    caso 4:
    {
INFO_PROPERTY[cid][p_POS_INT][0] = 2524.9165;
INFO_PROPERTY[cid][p_POS_INT][1] = -1679.4109;
INFO_PROPERTY[cid][p_POS_INT][2] = 1015.4873;
INFO_PROPERTY[cid][p_PRICE] = precio;
INFO_PROPERTY[cid][p_INTERIOR] = 1;
    }
    caso 5:
    {
INFO_PROPERTY[cid][p_POS_INT][0] = 2807.5103;
INFO_PROPERTY[cid][p_POS_INT][1] = -1174.0422;
INFO_PROPERTY[cid][p_POS_INT][2] = 1025.5898;
INFO_PROPERTY[cid][p_PRICE] = precio;
INFO_PROPERTY[cid][p_INTERIOR] = 8;
    }
}
    formato(str,sizeof(str),"{00A8FF}EN VENTA\n {FFFFFF}Precio:{00A8FF}%d\n {FFFFFF}ID casa:{00A8FF}%d\n {FFFFFF}Usa{00A8FF}/comprarcasa", precio, cid);
    INFO_PROPERTY[cid][p_LABEL] = Create3DTextLabel(str, -1, INFO_PROPERTY[cid][p_POS_EXT][0], INFO_PROPERTY[cid][p_POS_EXT][1], INFO_PROPERTY[cid][p_POS_EXT][2], 10.0, 0, 0);
CreateDynamicMapIcon(INFO_PROPERTY[cid][p_POS_EXT][0], INFO_PROPERTY[cid][p_POS_EXT][1], INFO_PROPERTY[cid][p_POS_EXT][2], 31, -1, 0, 0);
    ActualizarCasa(cid);
    cid = MAX_PROPERTY;
}
}
regreso 1;
}

no se que hacer porfa ayuda