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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,520
» Latest member: anassadil17
» Forum threads: 2,415
» Forum posts: 12,367

Full Statistics

Online Users
There are currently 406 online users.
» 0 Member(s) | 403 Guest(s)
Bing, Google, Discord

Latest Threads
United Gaming Life Rolepl...
Forum: Advertisements
Last Post: Cruncher
6 hours ago
» Replies: 0
» Views: 30
Adding new vehicles and s...
Forum: Programming
Last Post: __.A.__
2025-09-15, 02:52 AM
» Replies: 2
» Views: 211
How to create a custom SA...
Forum: Tech
Last Post: HELLHOUND
2025-09-15, 12:12 AM
» Replies: 1
» Views: 834
Silly little render a did...
Forum: Art
Last Post: HELLHOUND
2025-09-14, 09:00 PM
» Replies: 0
» Views: 111
HWID BAN
Forum: Questions and Suggestions
Last Post: HELLHOUND
2025-09-14, 08:44 PM
» Replies: 1
» Views: 945
Manual sorting of servers...
Forum: Questions and Suggestions
Last Post: HELLHOUND
2025-09-14, 08:35 PM
» Replies: 1
» Views: 760
San Fierro Cops And Robbe...
Forum: Advertisements
Last Post: Dr0pp
2025-09-13, 08:33 PM
» Replies: 0
» Views: 148
Zona América del Sur Free...
Forum: Advertisements
Last Post: kevinberriosflores
2025-09-12, 02:16 PM
» Replies: 1
» Views: 179
Busco copia de gamemode S...
Forum: Spanish/Espa?ol
Last Post: briancristaldo2021
2025-09-11, 11:14 AM
» Replies: 0
» Views: 180
[Tutorial] Registrando o ...
Forum: Portuguese/Portugu?s
Last Post: Crazy_ArKzX
2025-09-09, 08:36 PM
» Replies: 0
» Views: 307

 
  Health not saving in SQLite?
Posted by: CrypticSin - 2022-04-14, 12:14 AM - Forum: Pawn Scripting - Replies (3)

Trying to save player health but doesn't seem to be working i'll like to know what im doing wrong?

Created a table in OnGameModeInit:

PHP Code:
db_query(server_database"CREATE TABLE IF NOT EXISTS `USERS` (`NAME`, `IP`, `REGISTER_DATE`, `PASS`, `SCORE`, `KILLS`, `DEATHS`, `SKIN`, `HEALTH`, `pX`, `pY`, `pZ`, `pA`, `INT`, `WORLD`, `ADMIN`)");; 

Selecting data:
PHP Code:
public OnPlayerLogin(playeridbool:success)
{
    if(
success)
    {
        new 
query[256], field[24], field2[64];
        
format(querysizeof(query), "SELECT * FROM `USERS` WHERE `NAME` = '%s' COLLATE NOCASE"DB_Escape(ReturnName(playerid)));
        
database_result db_query(server_databasequery);
        if(
db_num_rows(database_result))
        {
            
db_get_field_assoc(database_result"ADMIN"fieldsizeof(field));
            
PlayerInfo[playerid][pAdmin] = strval(field);

            
db_get_field_assoc(database_result"SCORE"fieldsizeof(field));
            
SetPlayerScore(playeridstrval(field));

            
db_get_field_assoc(database_result"KILLS"fieldsizeof(field));
            
PlayerInfo[playerid][pKills] = strval(field);

            
db_get_field_assoc(database_result"DEATHS"fieldsizeof(field));
            
PlayerInfo[playerid][pDeaths] = strval(field);

            
db_get_field_assoc(database_result"SKIN"fieldsizeof(field));
            
PlayerInfo[playerid][pSkin] = strval(field);

            
db_get_field_assoc(database_result"REGISTER_DATE"field2sizeof(field2));
            
PlayerInfo[playerid][pRegister] = field2;

            
db_get_field_assoc(database_result"HEALTH"fieldsizeof(field));
            
PlayerInfo[playerid][pHealth] = floatstr(field);

            
db_get_field_assoc(database_result"pX"fieldsizeof(field));
            
PlayerInfo[playerid][pX] = floatstr(field);

            
db_get_field_assoc(database_result"pY"fieldsizeof(field));
            
PlayerInfo[playerid][pY] = floatstr(field);

            
db_get_field_assoc(database_result"pZ"fieldsizeof(field));
            
PlayerInfo[playerid][pZ] = floatstr(field);

            
db_get_field_assoc(database_result"pA"fieldsizeof(field));
            
PlayerInfo[playerid][pA] = floatstr(field);

            
db_get_field_assoc(database_result"INT"fieldsizeof(field));
            
PlayerInfo[playerid][pInt] = strval(field);

            
db_get_field_assoc(database_result"WORLD"fieldsizeof(field));
            
PlayerInfo[playerid][pWorld] = strval(field);
        } 

Inserting Health Data:
PHP Code:
? ??
    new 
query[400];
    
format(querysizeof(query), "INSERT INTO `USERS` (`NAME`, `PASS`, `ADMIN`, `IP`, `REGISTER_DATE`, `SCORE`, `KILLS`, `DEATHS`, `SKIN`, `HEALTH`, `pX`, `pY`, `pZ`, `pA`, `INT`, `WORLD`) VALUES ('%s', '%s', %d, '%s', '%s', %d, %d, %d, %d, %f, %f, %f, %f, %f, %d, %d)"DB_Escape(ReturnName(playerid)), passwordPLAYERipDateGetPlayerScore(playerid), PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], GetPlayerSkin(playerid), PlayerInfo[playerid][pHealth],
    
PlayerInfo[playerid][pX],
    
PlayerInfo[playerid][pY],
    
PlayerInfo[playerid][pZ],
    
PlayerInfo[playerid][pA],
    
PlayerInfo[playerid][pInt],
    
PlayerInfo[playerid][pWorld]);
    
database_result db_query(server_databasequery);
    
db_free_result(database_result); 

Updating Data:

PHP Code:
? ? ? ? ? ??
stock SaveAccount(playerid)
{
    new 
query[400], Float:pos[4];
    if(
PlayerInfo[playerid][pLoggedIn] == true)
    {
        
GetPlayerPos(playeridpos[0], pos[1], pos[2]);
        
GetPlayerFacingAngle(playeridpos[3]);
        
GetPlayerHealth(playeridPlayerInfo[playerid][pHealth]);

        
format(querysizeof(query),
        
"UPDATE `USERS` SET `ADMIN` = %d, `SCORE` = %d, `KILLS` = %d, `DEATHS` = %d, `SKIN` = %d, `HEALTH` = %f, `pX` = %f, `pY` = %f, `pZ` = %f, `pA` = %f, `INT` = %d, `WORLD` = %d, `ADMIN` = %d WHERE `NAME` = '%s' COLLATE NOCASE",
        
PlayerInfo[playerid][pAdmin], GetPlayerScore(playerid), PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], GetPlayerSkin(playerid), PlayerInfo[playerid][pHealth], pos[0], pos[1], pos[2], pos[3], GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid), PlayerInfo[playerid][pAdmin], DB_Escape(ReturnName(playerid)));
        
database_result db_query(server_databasequery);
        
db_free_result(database_result);
    }
    return 
1;


Code runs without errors but im still unsure on why its not saving and loading the players health..


Photo texture studio error.
Posted by: TheKosT - 2022-04-02, 02:21 PM - Forum: Support - Replies (1)

Hello friends how are you?



I come to you because after a long time I have decided to dedicate myself to MAPPER again.



I tried to open the texture STUDIO and firstly it gave me an error with the addons, well, I downloaded a gta default to use it and I solved it but I got an error.



Now nothing is loaded from the server, the filescripts are not loaded or anything, could you help me? I would like to map again and with this error I cannot.





Code:
SA-MP Dedicated Server

----------------------

v0.3.7-R2, (C)2005-2015 SA-MP Team



[10:48:47]

[10:48:47] Server Plugins

[10:48:47] --------------

[10:48:47]? Loading plugin: crashdetect

[10:48:47]? Failed.

[10:48:47]? Loading plugin: sscanf

[10:48:47]? Failed.

[10:48:47]? Loading plugin: streamer

[10:48:47]



*** Streamer Plugin v2.9.4 by Incognito loaded ***



[10:48:47]? Loaded.

[10:48:47]? Loading plugin: filemanager

[10:48:47] ******************

[10:48:47] ** FILE MANAGER **

[10:48:47] **? ? Loaded? ? **

[10:48:47] ** Version 1.5 **

[10:48:47] ******************

[10:48:47]? Loaded.

[10:48:47]? Loaded 2 plugins.



[10:48:47]

[10:48:47] Filterscripts

[10:48:47] ---------------

[10:48:47]? Loading filterscript 'tstudio.amx'...

[10:48:47]? Loading filterscript 'fsdebug.amx'...

[10:48:47]

? *********************

? * SA:MP DEBUG 0.2? *

[10:48:47]? * By Simon Campbell *

? *********************

[10:48:47]? * Version: 0.5d? ? ? *

? *********************

[10:48:47]? * -- LOADED? ? ? ? *

? *********************



[10:48:47]? Loaded 2 filterscripts.



[10:48:47]

/*-----------------------------------*\

[10:48:47] |*=====[TS Base GameMode Loaded]=====*|

[10:48:47] \*-----------------------------------*/



[10:48:47] Number of vehicle models: 0

[10:48:55] [connection] 127.0.0.1:51010 requests connection cookie.

[10:48:56] [connection] incoming connection: 127.0.0.1:51010 id: 0

[10:48:56] [join] James_Kalashnikov has joined the server (0:127.0.0.1)

[10:53:48] RCON (In-Game): Player #0 (James_Kalashnikov) has logged in.

[10:54:39] RCON (In-Game): Player [James_Kalashnikov] sent command: reloadfs

[10:55:00] RCON (In-Game): Player [James_Kalashnikov] sent command: reloadfs

[10:55:13] RCON (In-Game): Player [James_Kalashnikov] sent command: loadfs

[10:55:17] RCON (In-Game): Player [James_Kalashnikov] sent command: unloadfs

[11:08:49] [part] James_Kalashnikov has left the server (0:1)





[Image: RbWMi2n.jpg]

https://i.imgur.com/RbWMi2n.jpg


  cache_insert_id always return 0
Posted by: Axitz - 2022-03-30, 07:41 AM - Forum: Pawn Scripting - Replies (5)

Hi, sorry how bad this was.

I've created a team and the table is also is AI mode. There are multiples team in the query but whenever server restart or player quit, then create team, it always started at 0 again.

PHP Code:
forward TeamCreated(b);
public 
TeamCreated(b)
{

? ? 
TeamInfo[b][TeamID] = cache_insert_id();
? ? 
teamidd;
? ? 
printf("New Group is created: [%d]"teamidd );



PHP Code:
if(strcmp(usage"create"false) == 0)
{
? ? if(!
strlen(usage1)) return SCP(playerid"create <teamname>");
? ? if(
strlen(usage1) < || strlen(usage1) > 30) return SendClientError(playerid"Your team name is too short or too long! (Min 5, Max 30 chars)");
? ? new 
tmID teamidd;
? ? if(
PlayerInfo[playerid][tplayerteam] != -1) return SendClientError(playerid"You are already in a team. /team leave");
? ? 
TeamInfo[tmID][TeamID] = tmID;
? ? 
PlayerInfo[playerid][tplayerteam] = tmID;
? ? 
PlayerInfo[playerid][tranklvl] = 0;
? ? 
myStrcpy(PlayerInfo[playerid][TPTeamName],usage1);
? ? 
myStrcpy(PlayerInfo[playerid][trankname],"Children");
? ? 
TeamInfo[tmID][TActive]=true;
new 
sQuery[528];
mysql_format(sqldbsQuerysizeof sQuery"INSERT INTO `TeamInfo` (`TeamID`, `TeamName`, `StartRank`) VALUES (%d,'%e', 'Children')",tmID,usage1);
mysql_tquery(sqldbsQuery"TeamCreated""i",tmID);
}
else
{
SCP(playerid"<create> <input>");
}
return 
1;


  Mysql R41 problem.
Posted by: kexy - 2022-02-27, 03:42 PM - Forum: Support - Replies (3)

Hi all! I need help With MYSQL R41-4! It prints out these errors and I don't know why it could be, what could be wrong?



[Image: mysql.png]



https://i.ibb.co/yfmNJwy/mysql.png


Video War System
Posted by: Flint - 2022-02-19, 05:49 PM - Forum: Videos and Screenshots - No Replies

[Video: https://youtu.be/ZQmLyOmRibY]


  [DYNAMIC] Pedestrians
Posted by: IllidanS4 - 2022-02-06, 03:37 PM - Forum: Videos and Screenshots - Replies (3)

12000 pedestrians in SA, reacting to shots, explosions and vehicles. No plugins used except streamer.

[Video: https://www.youtube.com/watch?v=VuaG-IrROfk]

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


  Which one is better?
Posted by: Zow - 2022-01-26, 09:29 PM - Forum: Pawn Scripting - Replies (2)

PHP Code:
#define SendErrorMessage(%0, %1) SendClientMessage(%0, COLOR_RED, "[*]{FFFFFF} "%1) 



PHP Code:
SendErrorMessage(playerid, const msg[]) {

? ? new

? ? ? ? 
string[145];



? ? 
format(stringsizeof(string), "[*]"C_WHITE" %s"msg);



? ? return 
SendClientMessage(playeridCOLOR_REDstring);





I just want to know how different


  MySQL Query
Posted by: Slade - 2022-01-24, 04:55 PM - Forum: Pawn Scripting - Replies (1)

So basically i've done so many scripts using MySQL, but never had this problem and simply not finding way to solve it because i don't even understand why it happens.

I will explain here, I don't really need to post code since my other scripts with literally same code works great, I also tried to google it, but no luck.

So this is case: I've switched House system on old gamemode from Dini to MySQL. I've switched data by loading with Dini, saving with MySQL. Then i created loading. First I have used TQuery with callback, and got this errors:

Code:
[01/24/22 17:50:46] [plugins/mysql] cache_get_value_name_float: no active cache (C:\Users\llc\Documents\GM\gamemodes\YUBGM.pwn:24580)
[01/24/22 17:50:46] [plugins/mysql] cache_get_value_name_float: no active cache (C:\Users\llc\Documents\GM\gamemodes\YUBGM.pwn:24581)
[01/24/22 17:50:46] [plugins/mysql] cache_get_value_name_float: no active cache (C:\Users\llc\Documents\GM\gamemodes\YUBGM.pwn:24582)

This happens for every row in every iteration of cache num rows, table has around 1100 houses.

I've done it also with mysql_query and cache variable, same error appears.
Updated MySQL to latest version.
Changed variable names from?cache_get_value_name_float to?cache_get_value_float but still the same.

Important thing is: I printed second row after every iteration and cache function, and first 2 rows are getting loaded, and all others are not.
So yes i got 2 first selected rows loaded, others are literally ignored in loop.

Any possible solutions ?


Brick Desolation Roleplay
Posted by: Awide - 2022-01-21, 05:11 PM - Forum: Gamemodes - Replies (1)

Written 99.5% by me entirely from scratch. Put countless days and?nights into this gamemode.



Featuring NPC zombies, bandits, looting, factions, cities, inventory, item system, housing and businesses. I made it work on both Linux and Windows servers.



I am not willing to provide support nor answer questions. If you need the database (otherwise you cannot use the inventory and looting) PM me (DC: Awide#0896) and I will?consider your offer.



Otherwise, enjoy!



https://github.com/Awide/Desolation-SAMP


  Problem with plugin development
Posted by: Davee52 - 2022-01-18, 11:41 AM - Forum: Programming - No Replies

Hy everybody! I followed the instructions in the Plugin Development topic on the site, and I get errors as I include the invoke.hxx . I downloaded it on the link, added the file to the project, and included it in the code, but it gives me these errors:
https://imgur.com/a/Yamr46K
Thank you if you could lead me to success.