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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,054
» Latest member: adrianosilvaborges428
» Forum threads: 2,355
» Forum posts: 12,245

Full Statistics

Online Users
There are currently 385 online users.
» 0 Member(s) | 382 Guest(s)
Bing, Google, Yandex

Latest Threads
Plan C: Protect The Presi...
Forum: Advertisements
Last Post: PipPo
9 hours ago
» Replies: 0
» Views: 16
CODE5 GAMING COPS AND ROB...
Forum: Advertisements
Last Post: ryanthiago789
Yesterday, 03:02 AM
» Replies: 0
» Views: 28
SAMP RP project in 2024? ...
Forum: General Discussions
Last Post: tommchris
Yesterday, 02:05 AM
» Replies: 4
» Views: 2,462
Infekcja 2: Zombie Surviv...
Forum: Serwery
Last Post: tunnelrushgame3d
Yesterday, 01:50 AM
» Replies: 1
» Views: 190
FPS issues
Forum: General Discussions
Last Post: kourtneyroberts
2025-04-28, 04:53 AM
» Replies: 0
» Views: 21
How to make your GTA SA:M...
Forum: Tutorials
Last Post: NoxxeR
2025-04-27, 11:26 AM
» Replies: 1
» Views: 78
Problem about pawnbot
Forum: Pawn Scripting
Last Post: balkanspeed18
2025-04-26, 02:04 PM
» Replies: 0
» Views: 39
Error
Forum: Pawn Scripting
Last Post: -N0FeaR-
2025-04-25, 12:05 PM
» Replies: 0
» Views: 40
GTA Multigames [ MultiMod...
Forum: Advertisements
Last Post: Undead
2025-04-25, 07:37 AM
» Replies: 0
» Views: 50
Atlanta DeathMatch
Forum: Advertisements
Last Post: NixaSha
2025-04-25, 01:19 AM
» Replies: 0
» Views: 45

 
  Hooks Problem
Posted by: Kodokushi - 2021-03-08, 09:55 PM - Forum: Pawn Scripting - Replies (2)

Hi

I'm having a problem where a callback is not called in the modules (I'm using y_hooks). Using hooks with native callbacks this doesn't happen.



Code:
// GAMEMODE
forward OnPlayerChangeJob(playerid, pJob);
public OnPlayerChangeJob(playerid, pJob) {
}

OnPlayerChangeJob(playerid, pJob);

// MODULES
hook OnPlayerChangeJob(playerid, pJob) {
? ? SendClientMessage(playerid, -1, "CALLED!");
? ? return true;
}


Tongue MySQL Question
Posted by: kalEd - 2021-03-08, 02:34 PM - Forum: Pawn Scripting - Replies (4)

What is the most efficient and optimized method to save data in the database?



For example this?:

Code:
new gQuery[ 256?]; //at the beginning of the gamemode

//in a function=>

gQuery[ 0 ] = EOS;

mysql_format( handle, gQuery, sizeof gQuery, "INSERT INTO `logs` (`Player`, `IP`) VALUES ('%e', '%s')", getName( playerid ), getPlayerIp( playerid ) );

mysql_tquery( handle, gQuery, "", "" );



or this?:

Code:
new Query[ 90 ];

mysql_format( handle, Query, sizeof Query, "INSERT INTO `logs` (`Player`, `IP`) VALUES ('%e', '%s')", getName( playerid ), getPlayerIp( playerid ) );

mysql_tquery( handle, Query, "", "" );



What exactly does gQuery[0] = EOS; mean? What's the difference?


Question Script performance testing
Posted by: kalEd - 2021-03-08, 10:02 AM - Forum: Support - Replies (5)

How can I detect how fast a function is running using gettickcount??If anyone can give me an example, or if you know another method.


  samp-server-info-obtainer
Posted by: KyroKun - 2021-03-07, 11:32 PM - Forum: Libraries - Replies (3)

https://github.com/kyro95/samp-server-info-obtainer
??? samp-server-obtainer ? A simple library made in typescript for obtaining your samp server info

Example:

Code:
import sampServer from "./path";

async function doTest() {
    const test = await sampServer.retriveInfo({
        ip: "",
        port: 7777
    }, "i");
    
    console.log(test);
}

doTest();

// Prints out an object which contains the samp server info submitted.


  Question about pawn compiler
Posted by: robertocaribbean - 2021-03-07, 08:06 PM - Forum: Pawn Scripting - Replies (5)

Hi there,



I want to use spanish words in my gamemode, but the compiler throws error when try to compile.



Code:
CMD:veh?culo(playerid, params[]) {



? SendClientMessage(playerid, -1, "test");



? return 1;

}

This throws an error: "Invalid function or declaration" in the line where "veh?culo" word is.







Also when I want to use SendClientMessage, there is no error at compiler level but the message look weird character, instead of the character I want.



Maybe the compiler doesn't support characters like " ? "?



Code:
CMD:test(playerid, params[]) {



? SendClientMessage(playerid, -1, "veh?culo");



? return 1;



}











[Image: rUHhU8b.png]


  Actor weapon
Posted by: annety - 2021-03-07, 02:30 PM - Forum: Pawn Scripting - Replies (11)

Based on this actor:

Code:
// 24-7
CreateDynamicActor(bizzid, 17, 142, -29.0206,-186.8182,1003.5469,1.6775);

With editdynamic object i found a formula to get the weapon position based on actor position?(to put the weapon in actor hands):
Code:
? ? // created [15:21:57] x[-29.020599] y[-186.818206] z[1003.546875] RotX[0] RotY[0] RotZ[0]
? ? new Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz;
? ? GetDynamicActorPos(actorid, x, y, z);
? ? // moved [15:23:45] x[-28.945550] y[-186.275421] z[1003.882324] rx[0.000000] ry[-3.300002] rz[98.899940]
? ? x = 1.0;
? ? x -= 0.924951;
? ? y = 0.542785;
? ? z = 0.335449;
? ? rx = 0.0;
? ? ry = -3.300002;
? ? rz = 98.899940;
? ? DestroyDynamicObject(ActorInfo[actorid][actorGun]);
? ? ActorInfo[actorid][actorGun] = CreateDynamicObject(GetGunObjectID(24), x, y, z, rx, ry, rz);

For this actor it become amazing:
[Image: Tfc0wa7.png]



I did think that it gonna work with all other actores, but didn't:

Code:
// pizza
CreateDynamicActor(bizzid, 5, 155, 374.7394,-117.2788,1001.4922,180.5908);

[Image: igOe4f7.png]

Code:
// alambra
CreateDynamicActor(bizzid, 17, 194, 501.6993,-20.4994,1000.6797,88.5219);

[Image: rA9pALX.png]

Anybody more experienced could help me to make the weapon works on all actor like the first one (24/7)?
Would be an amazing feature to all servers do in some way put a weapon on actor hands based on his position...
(i know about npc, i want fix this way to put this weapons for actors)


  Server - Unkown
Posted by: Trhzexe - 2021-03-07, 12:38 PM - Forum: Pawn Scripting - Replies (5)

Hello, I would like to ask, why does the server suit me with an unknown server?


  Long callback execution detected (hang or performance issue)
Posted by: GospodinX - 2021-03-07, 10:12 AM - Forum: Pawn Scripting - Replies (2)

Hi guys



My crash detect log is full with this error



Code:
Long callback execution detected (hang or performance issue)

AMX backtrace:

#0 0082299c in public WoodGrowing () at



(every one minute)

This is a timer that starts every 60 seconds with a loop





Code:
for(new i; i < 2000; i)



I just need to have this loop. How I can improve it to avoid the error.







PHP Code:
#define MAX_WOOD 2000

enum Wood

{

dIDImanja,

Float:dWoodX,

Float:dWoodY,

Float:dWoodZ,

dTime,

dPostavljeno,

dObjd,

dText,

dVrsta,

dHour,

dMin,

dWood,

dProsloMinuta,

dProsloSat,

dUkradeno

};

new 
DI[MAX_WOOD][Wood];

forward WoodGrowing();

public 
WoodGrowing()

{

new 
stringv[128];

new 
vrsta[10];

for(new 
isizeof(DI); i)

{

if(
DI[i][dPostavljeno] == 1)

{

if(
DI[i][dVrsta] == 1) { vrsta "Sljiva"; }

else if(
DI[i][dVrsta] == 2) { vrsta "Kruska"; }

else if(
DI[i][dVrsta] == 3) { vrsta "Jabuka"; }

if(
DI[i][dHour] >= && DI[i][dMin] >= 1)

{

DI[i][dMin] --;

format(stringv,128,"Voce jos nije izraslo !\nVrijeme do izrastanja: %d sati, %d minuta\nVrsta drveca: %s",DI[i][dHour],DI[i][dMin],vrsta);

UpdateDynamic3DTextLabelText(DrvoLabel[i], -1stringv);

}

else if(
DI[i][dMin] == && DI[i][dHour] >= 1)

{

DI[i][dHour] --;

DI[i][dMin] = 60;

format(stringv,128,"Voce jos nije izraslo !\nVrijeme do izrastanja: %d sati, %d minuta\nVrsta drveca: %s",DI[i][dHour],DI[i][dMin],vrsta);

UpdateDynamic3DTextLabelText(DrvoLabel[i], -1stringv);

}

else if(
DI[i][dHour] == && DI[i][dMin] == 0)

{

format(stringv,128,"Voce je izraslo !\nDa oberes voce kucaj/oberivoce\nVrsta drveca:%s",vrsta);

UpdateDynamic3DTextLabelText(DrvoLabel[i], -1stringv);

if(
DI[i][dProsloSat] >= && DI[i][dProsloMinuta] >= 1DI[i][dProsloMinuta] --;

else if(
DI[i][dProsloMinuta] == && DI[i][dProsloSat] >= 1) {

DI[i][dProsloMinuta] --;

DI[i][dProsloSat] = 60;

}

SaveWood(i);

}

}

}

return 
1;



Sad [Ajuda] Registrar no SMF in-game
Posted by: Akirah - 2021-03-07, 05:01 AM - Forum: Portuguese/Portugu?s - Replies (4)

Hello!



Bom, gostaria de saber se existe algum tutorial, plugin ou sla o que que possa me ajudar com isso.



Estou querendo fazer com que quando o jogador atingir um certo n?vel automaticamente uma conta para ele ? criada no f?rum, tentei fazer sozinho seguindo minha l?gica por?m n?o deu muito certo, poderiam me ajudar nisto? N?o encontrei nada sobre ;-



Desde j? agrade?o.


  Run time error 19: "File or function is not found"
Posted by: Boxi - 2021-03-07, 02:17 AM - Forum: Pawn Scripting - Replies (6)

Hello, it's me again :P Well, many of you will already know this famous error:



Code:
[21:42:01] [debug] Run time error 19: "File or function is not found"

[21:42:01] [debug]? WP_Hash

[21:42:01] [debug] Run time error 19: "File or function is not found"

[21:42:01] [debug]? WP_Hash

[21:42:01] Script[gamemodes/roleplay.amx]: Run time error 19: "File or function is not found"



The fact is that I did everything to solve it, such as updating all the plugins and libraries until the code was compiled again. But nothing solves it :c any ideas? Thank you!



Here is a list of the libraries that I am using:



Code:
#include <crashdetect>

#include <a_mysql>

#include <foreach>

#include <easyDialog>

#include <eSelection>

#include <sscanf2>

#include <streamer>

#include <zcmd>



Postscript: Gm compiles without any problem