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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,518
» Latest member: zuzx
» Forum threads: 2,415
» Forum posts: 12,367

Full Statistics

Online Users
There are currently 499 online users.
» 0 Member(s) | 496 Guest(s)
Bing, Google, Applebot

Latest Threads
United Gaming Life Rolepl...
Forum: Advertisements
Last Post: Cruncher
1 hour ago
» Replies: 0
» Views: 6
Adding new vehicles and s...
Forum: Programming
Last Post: __.A.__
2025-09-15, 02:52 AM
» Replies: 2
» Views: 197
How to create a custom SA...
Forum: Tech
Last Post: HELLHOUND
2025-09-15, 12:12 AM
» Replies: 1
» Views: 831
Silly little render a did...
Forum: Art
Last Post: HELLHOUND
2025-09-14, 09:00 PM
» Replies: 0
» Views: 110
HWID BAN
Forum: Questions and Suggestions
Last Post: HELLHOUND
2025-09-14, 08:44 PM
» Replies: 1
» Views: 940
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: 146
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: 306

 
  Get away from those single file gamemodes
Posted by: Double-O-Seven - 2019-05-31, 06:48 PM - Forum: Questions and Suggestions - Replies (11)

I just check out Github and saw that even the 3 example gamemodes are single files. I think you should lead as an example and implement examples in a modularized manner, no matter how small the gamemode. I think if SAMPs example had been more modularized from the beginning we wouldn?t have as many 60k line single file?abominations as we have today.


  Plugin failed to load
Posted by: Hype - 2019-05-31, 02:07 PM - Forum: Support - Replies (2)



I'm trying to load compiled GDK map in plugin but it fails to load:

1. I followed all steps correctly, gamemode loads

2. I compiled plugin in x64 instead of x86 since I don't see option to compile it in x86.

3. I have all MS bullshit .dlls for server to run this plugin




My IDE is Microsoft Visual Studio.



There are no more options to choose.

https://imgur.com/a/JGQJQvH


  sampctl crashes
Posted by: 6cadilab9 - 2019-05-31, 08:37 AM - Forum: Support - Replies (7)

Type: Server

Operating System:?Ubuntu 16.04 desktop

Server Version: 0.3.7

Plugins Installed: Yes

Plugins (If above is yes):?https://pastebin.com/jrJL1Z2V

YSI Included: Yes 3.1

Output (Logs):?https://pastebin.com/Tnex5cwd


  sampctl again
Posted by: 6cadilab9 - 2019-05-30, 09:51 PM - Forum: Support - Replies (3)

Sorry for asking for help again, feeling like a noob, but this is my first time using this package manager,

i've managed to compile the script, i guess everything from plugins to includes is as it is supposed to be, but now when I try to start the server using



sampctl server run



I get



ERROR: failed to interpret directory as Pawn package: failed to unmarshal samp.json: json: cannot unmarshal string into Go struct field Runtime.output of type bool



Same if I try to ensure, this is samp.json



Code:
{

"rcon_password": "hidden",

"port": 7777,

"hostname": "Balkan Underground",

"maxplayers": 32,

"entry": "balkan-underground.pwn",

"output": "balkan-underground.amx"

}


  SA-MP protocol
Posted by: steve2 - 2019-05-30, 09:40 PM - Forum: Support - Replies (2)

How do I can get an online and ping of a SA-MP servers? As I know, a SA-MP client sends UDP requests to the?server. There are?protocol description? Thx. Also I use Node.js


  Removed Vyrezannye Skins GTA San Andreas
Posted by: Rafael_Rosse - 2019-05-30, 06:06 PM - Forum: Questions and Suggestions - Replies (4)

[Image: Bsp2DSeLWtY.jpg]



Hi guys, I suggest,to make, Skins GTA San Andreas, yes i know they can't make them in a SA:MP no

how skins are made only in the cut scene

but developers can redraw and make them into their client because it?s their client that will add new life to GTA sa

[Video: https://www.youtube.com/watch?v=U7C-nK7ZD_M]

I do not ask to make such exact points I ask you to make new ones to redraw and add them to the samp, add just a little bit of the life of the GTA if it is possible


  [GU?A] Administrador de Templates simples PHP
Posted by: DarkThinking - 2019-05-30, 05:16 PM - Forum: Programaci?n - Replies (8)

En esta gu?a te har? un simple administrador de templates.

Aclaro:
-> este script reemplaza un tag {dato} por una variable o el resultado de una funci?n,
-> es simple y no necesita tanto conocimiento de php para adaptarlo.

Primero crearemos una funcion para obtener el archivo:

PHP Code:
<?php
class Template
{
? ?private 
$tags = []; // tags
? ?private $template// archivo

? ?public function getFile($file// obtener archivo
? ?{
? ? ? ?if(
file_exists($file)) // si existe el archivo
? ? ? ?{
? ? ? ? ? ?
$file file_get_contents($file); // obtiene los datos
? ? ? ? ? ?return $file// y retorna el archivo (los datos)
? ? ? ?}
? ? ? ?else
? ? ? ?{
? ? ? ? ? ?return 
false// retorna 0 o falso en caso de error o no existir el archivo
? ? ? ?}
? ?} 

Luego creamos una funcion para "renderizar" el codigo

PHP Code:
? ?public function render() // renderizar o reemplazar tags
? ?{
? ? ? ?
$this->replaceTags(); // reemplazar tags?

? ? ? ?echo $this->template// imprimir los datos de php reemplazando los tags
? ?} 

Ahora la funcion __construct y el set para poder poner lo reemplazable en el HTML

PHP Code:
? ?public function __construct($templateFile// buscar archivo
? ?{
? ? ? ?
$this->template $this->getFile($templateFile);
? ? ? ?if(!
$this->template) {
? ? ? ? ? ?return 
"Error! no puedo cargar el template -> $templateFile";
? ? ? ?}
? ?}
? ?public function 
set($tag$value// crear tags
? ?{
? ? ? ?
$this->tags[$tag] = $value;
? ?} 

Ahora la funcion que REEMPLAZA los codigos tag

PHP Code:
? ?private function replaceTags() // reemplazar tags
? ?{
? ? ? ?foreach (
$this->tags as $tag => $value) {
? ? ? ? ? ?
$this->template str_replace('{'.$tag.'}'$value$this->template);
? ? ? ?}

? ? ? ?return 
true;
? ?}



bueno esto funciona as?:

PHP Code:
<?php
require_once 'Template.php';
$tpl = new Template('archivo.html'); // creamos el template el cual se carga automaticamente

$tpl->set('codigoparahtml'$variableofuncion); // creamos el tag

$tpl->render(); // "renderizamos"
?>

en el HTML ponemos:

Code:
<h3>{codigoparahtml}</h3>

y se reemplazar? por

$variableofuncion

Codigo completo:

PHP Code:
<?php
class Template
{
? ?private 
$tags = []; // tags
? ?private $template// archivo

? ?public function getFile($file// obtener archivo
? ?{
? ? ? ?if(
file_exists($file))
? ? ? ?{
? ? ? ? ? ?
$file file_get_contents($file);
? ? ? ? ? ?return 
$file;
? ? ? ?}
? ? ? ?else
? ? ? ?{
? ? ? ? ? ?return 
false;
? ? ? ?}
? ?}

? ?public function 
render() // renderizar o reemplazar tags
? ?{
? ? ? ?
$this->replaceTags();

? ? ? ?echo 
$this->template;
? ?}

? ?public function 
__construct($templateFile// buscar archivo
? ?{
? ? ? ?
$this->template $this->getFile($templateFile);
? ? ? ?if(!
$this->template) {
? ? ? ? ? ?return 
"Error! no puedo cargar el template -> $templateFile";
? ? ? ?}
? ?}
? ?public function 
set($tag$value// crear tags
? ?{
? ? ? ?
$this->tags[$tag] = $value;
? ?}
? ?private function 
replaceTags() // reemplazar tags
? ?{
? ? ? ?foreach (
$this->tags as $tag => $value) {
? ? ? ? ? ?
$this->template str_replace('{'.$tag.'}'$value$this->template);
? ? ? ?}

? ? ? ?return 
true;
? ?}



  simplificar checkpoints
Posted by: zzztgtzzz - 2019-05-30, 12:00 AM - Forum: Programaci?n - Replies (2)

Buenas! quer?a saber como se puede hacer para reducir los checkpoints, en vez de tener todas estas lineas, hacerlo mas reducido.



Code:
? ?if(GetPVarInt(playerid,"TEST_CP") == 0)

? ? ? ? ? ?{

? ? ? ? ? ? ? ?SetPVarInt(playerid, "TEST_CP", 1);

? ? ? ? ? ? ? ? SetPlayerCheckpoint(playerid, -4048.2869,-3002.8801,1351.9772, 5);

? ? ? ? ? ? ? ?return 1;

? ? ? ? ? ?}

? ? ? ? ? ?if(GetPVarInt(playerid,"TEST_CP") == 1)

? ? ? ? ? ?{

? ? ? ? ? ? ? ?SetPVarInt(playerid, "TEST_CP", 2);

? ? ? ? ? ? ? ?PuntoTest[playerid] ;

? ? ? ? ? ? ? ? SetPlayerCheckpoint(playerid, -4035.4558,-3038.5496,1351.9779, 5);

? ? ? ? ? ? ? ?return 1;

? ? ? ? ? ?}

? ? ? ? ? ?if(GetPVarInt(playerid,"TEST_CP") == 2)

? ? ? ? ? ?{

? ? ? ? ? ? ? ?SetPVarInt(playerid, "TEST_CP", 3);

? ? ? ? ? ? ? ? SetPlayerCheckpoint(playerid, -4039.2056,-3066.4712,1351.9767, 5);

? ? ? ? ? ? ? ?return 1;

? ? ? ? ? ?}

? ? ? ? ? ?if(GetPVarInt(playerid,"TEST_CP") == 3)

? ? ? ? ? ?{

? ? ? ? ? ? ? ?SetPVarInt(playerid, "TEST_CP", 4);

? ? ? ? ? ? ? ? SetPlayerCheckpoint(playerid, -4017.9539,-3052.5557,1351.9771, 5);

? ? ? ? ? ? ? ?return 1;

? ? ? ? ? ?}

? ? ? ? ? ?if(GetPVarInt(playerid,"TEST_CP") == 4)

? ? ? ? ? ?{

? ? ? ? ? ? ? ?SetPVarInt(playerid, "TEST_CP", 0);

? ? ? ? ? ? ? ? SetPlayerCheckpoint(playerid, ?-4048.2869,-3002.8801,1351.9772, 5);

? ? ? ? ? ? ? ?return 1;

? ? ? ? ? ?}


  y_inline - y_hooks
Posted by: Juance - 2019-05-28, 10:38 PM - Forum: Spanish/Espa?ol - Replies (2)

Buenas a todos, mirando por el foro me encontr? que muchos acostumbran a usar librer?as de YSI como son las: y_hooks y tambi?n y_inline

Alguien podr?a darme una breve introducci?n acerca de esos dos librer?as?y en qu? caso se pueden aplicar? muchas gracias


  Loops
Posted by: Cubie - 2019-05-28, 12:49 PM - Forum: Pawn Scripting - Replies (8)

Is there actually a way to check if a loop is finished?

I'm going to try to explain.



e.g loop:

PHP Code:
foreach (new Player)

{

? ??if(
example[playerid] == 4)

? ? {

? ? ? 
//Someting

? ? }

? ? return 
1;





e.g what I wonder:

PHP Code:
[Loop Finishes]

{

//Code





If anybody knows a fancy other trick that is fine too off course.

Thanks in advance.