Quantcast
Channel: SA-MP Forums
Viewing all 18226 articles
Browse latest View live

question about limits

$
0
0
hi so suppose lets take example of mapicons limit and its max 100 so what will happen if i load two gamemodes? my mapicon will be 200?

i just want confirm this
thx

Begginer, need /night command

$
0
0
Hello, can anybody help me about scripting in texture studio.
I just need a new command for changing time, it doesn't need to have from 0-24
Just for example 22h. All i need is night to test light objects...

I'm very interested in scripting but i don't get it. I'm not sure what file i should open in PAWNO.
Whether in "gamemodes" folder, or somewhere else.

Anyway i think it's here: Texturestudio>filecripts>TD.pwn
'Cause here's /text command i belive: https://i.imgur.com/LwOnwTZ.png

Thanks. :)

[Tutorial] Anti Car Shoot - Anti Car Player Crasher (./.cr)

$
0
0
Code:

public OnPlayerStateChange(playerid, newstate, oldstate)
{
          new strings[256],Float:KOR[3];
          if(newstate == PLAYER_STATE_PASSENGER || oldstate == PLAYER_STATE_PASSENGER || newstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_DRIVER)
          {
                new cars = GetPlayerVehicleID(playerid);
                GetVehiclePos(cars,KOR[0],KOR[1],KOR[2]);
                if(GetTickCount()- GetPVarInt(playerid, "anticarshoot") < 500)
                {
                        new name[MAX_PLAYER_NAME];
                        GetPlayerName(playerid, name, sizeof(name));
                        SetVehiclePos(cars,KOR[0],KOR[1],KOR[2]);
                        format(strings,sizeof(strings),"(( * %s Player is kicked from server by anti cheating system. Reason: Anti Car Shoot. ))",name);
                        SendClientMessageToAll(-1,strings);
                        Kick(playerid);
                }
                SetPVarInt(playerid,"anticarshoot",GetTickCount());
          }
          return true;
}

Problem with UserControlPanel

$
0
0
When i try to enter in the https://ucp.playsanandreas.com/

I have set our database/gameserver credentials to the Config file.


but still i will get the error message:


PHP Code:

2019/11/19 07:22:03 [error1128#0: *1022 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 45.64.220.39, server: ucp.playsanandreas.com, request: "GET /favicon.ico HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm/ucp.sock:", host: "ucp.playsanandreas.com", referrer: "https://ucp.playsanandreas.com/"
2019/11/19 07:22:59 [error4529#0: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Exception: Connection Error: SQLSTATE[HY000] [2002] No such file or directory in /usr/share/nginx/ucp/models/Database.php:85
Stack trace:
#0 /usr/share/nginx/ucp/public/index.php(41): Database->connect()
#1 {main}
  
thrown in /usr/share/nginx/ucp/models/Database.php on line 85" while reading response header from upstream, client: 45.64.220.39, server: ucp.playsanandreas.com, request: "GET HTTP/2.0", upstream: "fastcgi://unix:/var/run/php-fpm/ucp.sock:", host: "ucp.playsanandreas.com" 

problem with car personal

$
0
0
I have a small problem, when I try to get my car, it doesn't work.

HTML Code:

for(new i = 0; i < MAX_CARS; i++)
              {
                new Float:X1, Float:Y1, Float:Z1, Float:A1;
                //--------------------------------------------------------------
                if(IsPlayerInAnyVehicle(playerid)) return SendError2(playerid, "You must be out of your vehicle in order to call your personal car!", "Trebuie sa iesi din masina momentan pentru a-ti chema vehiculul personal!");
                //--------------------------------------------------------------
                    GetPlayerPos(playerid, X1, Y1, Z1);
                    GetPlayerFacingAngle(playerid, A1);
                    //--------------------------------------------------------------
                SetVehiclePos(vID[i], VehiclePos[i][0], VehiclePos[i][1], VehiclePos[i][2]);
                    SetVehicleZAngle(vID[i], VehiclePos[i][3]);
                    PutPlayerInVehicle(playerid, vID[i], 0);
                    //--------------------------------------------------------------
                    Announce(playerid, "~y~Personal ~r~~h~car~n~~g~~h~~h~teleported to you!", 4000, 3);
                                //--------------------------------------------------------------
                    return 1;
                          }

Quick question

$
0
0
Good evening, I would like to ask you guys since you are here more then I, where 0.3DL gone? I just wanted to test something but since it is gone I can`t, so do you know any answer?

[Ajuda] Sistema de som em carros

$
0
0
Queria saber se tem alguma função tipo o MoveObject só que para o audio stream para exemplo: colocar em um carro para sair o som para fora e conforme ainda o som segue o carro

help

$
0
0
How can I solve that?:

HTML Code:

D:\Counter-Strike 1.6 - WaRzOnE\RSZ - de lucru\gamemodes\RSZ.pwn(21184) : error 001: expected token: "]", but found "-identifier-"
D:\Counter-Strike 1.6 - WaRzOnE\RSZ - de lucru\gamemodes\RSZ.pwn(21184) : error 029: invalid expression, assumed zero
D:\Counter-Strike 1.6 - WaRzOnE\RSZ - de lucru\gamemodes\RSZ.pwn(21184) : error 029: invalid expression, assumed zero
D:\Counter-Strike 1.6 - WaRzOnE\RSZ - de lucru\gamemodes\RSZ.pwn(21184) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664                          Copyright (c) 1997-2006, ITB CompuPhase

And that is the code:

HTML Code:

for(new i=0; i < sizeof(Vehicles[][VehicleMods]); i++)

Show cops on radar (only for other cops)

$
0
0
I have this function:
pawn Code:
forward TeamRadar(playerid); public TeamRadar(playerid) {
    if(IsACop(playerid)) {
        foreach(new i : Player) {
            if(IsACop(i)) {
                SetPlayerMarkerForPlayer(i, playerid, COLOR_LIMEGREEN);
            }
        }
    }
}

It is called in function every 1 second, check if player is a COP, and if player is a COP show to others COPs on radar...
It is already working, but there is a problem, if the partner go out of the player range, map icon show always to north
Even if the partner is not on the north
There is a way to fix it?

My server is already:
pawn Code:
ShowPlayerMarkers(1);

TextDraws on Mobile

$
0
0
Hey guys, please help with TextDraws on SAMP Mobile, when I open TextDraw, the following inscriptions appear in the chat ... https://imgur.com/a/aHlXAtJ (on the screenshot). How to fix this so that TextDraws display themselves and without the /sc command?

[Ajuda] Problema com codificação UTF-8

$
0
0
Fiz um pequeno teste utilizando a biblioteca HTTP e uma pagina na internet que exibia somente um texto escrito olá. No teste eu queria pegar o conteúdo dessa pagina na internet (nesse caso somente o texto olá) através de um comando in-game onde o jogador digitaria por ex: /teste e seria exibido pra ele uma mensagem com o conteúdo da página. O problema é que ao invés de ser exibido olá para o jogador está sendo exibido olá. O código ficou assim:


Code:

CMD:teste(playerid, params[]){
      HTTP(playerid, HTTP_GET, "meusite.com/ola.php", "", "Response");
      return 1;
}

forward Response(index, response_code, data[]);
public Response(index, response_code, data[])
{
    if(response_code == 200)
    {
        SendClientMessage(index, 0xFFFFFFFF, data);
    }
}

Na página:

PHP Code:

<?php 
     
echo 'olá';
?>

Queria saber se isso é normal e se eu precisaria de uma função pra codificar o que é recebido ou se é causado por outra coisa.

How to read USERDATA.DAT, File where servers are stored?

$
0
0
Hi, As the title says. What is the original format of that file?
How to read it? to display it for example with the Notepad.


Thank you, I await your answers!

Problem in accessing site in India

$
0
0
Why it is happening? Even VPN's location set to India is not working.

Attached Images
File Type: png Untitled.png (73.4 KB)

HTTP and utf-8 encoding

$
0
0
(Using ****** translate...)


I did a little test using the HTTP library and a web page that displayed only text written olá. In the test I wanted to get the content of this page on the internet (in this case only the text olá) through a command in the game, where the player typed for example: /test and would be displayed to him a message with the page content. The problem is that instead of being displayed olá to the player is being displayed olá. The code looks like this:
through a command in the game, where the player typed for example
Code:

CMD:teste(playerid, params[]){
      HTTP(playerid, HTTP_GET, "mysite.com/ola.php", "", "Response");
      return 1;
}

forward Response(index, response_code, data[]);
public Response(index, response_code, data[])
{
    if(response_code == 200)
    {
        SendClientMessage(index, 0xFFFFFFFF, data);
    }
}


in my page

PHP Code:

<?php 
     
echo 'olá';
?>

I was wondering if this is normal and if I would need a function to encode what is received or if it is caused by something else.

[Plugin] brancher


Was working on a project for 0.3dl but that's gone.

$
0
0
So I was recently informed after a while away by my friend that we should just quit the project ( was a zombie rp server with custom models and a whole custom map ). He also told me that you can no longer connect to 0.3dl servers ( don't know if this is true all servers I have on my list now show 0/0 players. )

Tela de Login [BRASIL PLAY LIFE]

Admin command level prob

$
0
0
Hello guys, today i did some changes in the admin system and now some commands not working for the level i setted.

Code:

CMD:screen(playerid,params[])
{
        if(PlayerInfo[playerid][Admin] >= 2) return SendClientMessage(playerid, Dred, NOTALLOWED );
        new id,txt[50];
        if(sscanf(params,"ds[50]",id,txt)) return USG(playerid,"/Screen [Text]");
        if(id == playerid) return ERR(playerid,"You cannot screen yourself.");
        if(!IsPlayerConnected(id)) return ERR(playerid,"Player is not connected");
        if(PlayerInfo[id][Admin] > PlayerInfo[playerid][Admin]) return ERR(playerid,"You cant use this command on higher level admins");
        GameTextForPlayer(id,txt,4000,3);
        CMDMessageToAdmins(playerid,"SCREEN");
        Form(playerid,Lb,"* You have sent a screen message to %s(%d)",PlayerInfo[id][Nick],id);
        Form(id,blue,"* Administrator %s Has sent you screen message",PlayerInfo[playerid][Nick]);
        return 1;
}


Code:

if(PlayerInfo[playerid][Admin] >= 2) return SendClientMessage(playerid, Dred, NOTALLOWED );
Which one is correct? "<" or ">"

Or i need reset each each?

[Tutorial] Pre-sized random strings

$
0
0
Hi guy's I'm making a little system for my RP server for transfer "money" player to player like an IBAN code...then after taked a look on internet I didn't found nothing interesting, then I tryied a raw method, then it work.
It's various stock for get random strings, number, character.
This is a basic random method, hope you liked and it's usefull for who need it.
(sorry if I wrote wrong, I'm from Italy...then MAMMAMIA MARCELLO, pizzeria, mafia etc :lol: )

how to use
for make it easy this is a little example:
pawn Code:
CMD:test(playerid, params[])
{
    new string[22];
    format(string, sizeof(string), "%s", SizedRandomNumbers(10) );
    SendClientMessage(playerid, -1, string);
    return 1;
}
/*
the output will be a string with 10 random numbers
and not like using random(9999999999) where the output can be less than you wanted
*/

the code
pawn Code:
/* --- numbers --- */
stock SizedRandomNumbers(size)
{
    new str[128];
    for(new i=0; i<size; i++)
    {
        format(str, sizeof(str), "%s%d", str, random(9));
    }
    return str;
}

/* --- Characters --- */
stock SizedRandomUpperCharacters(size)
{
    new str[128];
    for(new i=0; i<size; i++)
    {
        new lettere = RandomEx(1, 26);
        switch(lettere)
        {
            case 1: format(str, sizeof(str), "%sA", str);
            case 2: format(str, sizeof(str), "%sB", str);
            case 3: format(str, sizeof(str), "%sC", str);
            case 4: format(str, sizeof(str), "%sD", str);
            case 5: format(str, sizeof(str), "%sE", str);
            case 6: format(str, sizeof(str), "%sF", str);
            case 7: format(str, sizeof(str), "%sG", str);
            case 8: format(str, sizeof(str), "%sH", str);
            case 9: format(str, sizeof(str), "%sI", str);
            case 10: format(str, sizeof(str), "%sL", str);
            case 11: format(str, sizeof(str), "%sM", str);
            case 12: format(str, sizeof(str), "%sN", str);
            case 13: format(str, sizeof(str), "%sO", str);
            case 14: format(str, sizeof(str), "%sP", str);
            case 15: format(str, sizeof(str), "%sQ", str);
            case 16: format(str, sizeof(str), "%sK", str);
            case 17: format(str, sizeof(str), "%sJ", str);
            case 18: format(str, sizeof(str), "%sR", str);
            case 19: format(str, sizeof(str), "%sS", str);
            case 20: format(str, sizeof(str), "%sT", str);
            case 21: format(str, sizeof(str), "%sU", str);
            case 22: format(str, sizeof(str), "%sV", str);
            case 23: format(str, sizeof(str), "%sZ", str);
            case 24: format(str, sizeof(str), "%sX", str);
            case 25: format(str, sizeof(str), "%sY", str);
            case 26: format(str, sizeof(str), "%sW", str);
        }
    }
    return str;
}

stock SizedRandomDownCharacters(size)
{
    new str[128];
    for(new i=0; i<size; i++)
    {
        new lettere = RandomEx(1, 26);
        switch(lettere)
        {
            case 1: format(str, sizeof(str), "%sa", str);
            case 2: format(str, sizeof(str), "%sb", str);
            case 3: format(str, sizeof(str), "%sc", str);
            case 4: format(str, sizeof(str), "%sd", str);
            case 5: format(str, sizeof(str), "%se", str);
            case 6: format(str, sizeof(str), "%sf", str);
            case 7: format(str, sizeof(str), "%sg", str);
            case 8: format(str, sizeof(str), "%sh", str);
            case 9: format(str, sizeof(str), "%si", str);
            case 10: format(str, sizeof(str), "%sl", str);
            case 11: format(str, sizeof(str), "%sm", str);
            case 12: format(str, sizeof(str), "%sn", str);
            case 13: format(str, sizeof(str), "%so", str);
            case 14: format(str, sizeof(str), "%sp", str);
            case 15: format(str, sizeof(str), "%sq", str);
            case 16: format(str, sizeof(str), "%sk", str);
            case 17: format(str, sizeof(str), "%sj", str);
            case 18: format(str, sizeof(str), "%sr", str);
            case 19: format(str, sizeof(str), "%ss", str);
            case 20: format(str, sizeof(str), "%st", str);
            case 21: format(str, sizeof(str), "%su", str);
            case 22: format(str, sizeof(str), "%sv", str);
            case 23: format(str, sizeof(str), "%sz", str);
            case 24: format(str, sizeof(str), "%sx", str);
            case 25: format(str, sizeof(str), "%sy", str);
            case 26: format(str, sizeof(str), "%sw", str);
        }
    }
    return str;
}

stock SizedRandomUDCharacters(size)
{
    new str[128];
    for(new i=0; i<size; i++)
    {
        new lettere = RandomEx(1, 52);
        switch(lettere)
        {
            // lettere minuscole
            case 1: format(str, sizeof(str), "%sa", str);
            case 2: format(str, sizeof(str), "%sb", str);
            case 3: format(str, sizeof(str), "%sc", str);
            case 4: format(str, sizeof(str), "%sd", str);
            case 5: format(str, sizeof(str), "%se", str);
            case 6: format(str, sizeof(str), "%sf", str);
            case 7: format(str, sizeof(str), "%sg", str);
            case 8: format(str, sizeof(str), "%sh", str);
            case 9: format(str, sizeof(str), "%si", str);
            case 10: format(str, sizeof(str), "%sl", str);
            case 11: format(str, sizeof(str), "%sm", str);
            case 12: format(str, sizeof(str), "%sn", str);
            case 13: format(str, sizeof(str), "%so", str);
            case 14: format(str, sizeof(str), "%sp", str);
            case 15: format(str, sizeof(str), "%sq", str);
            case 16: format(str, sizeof(str), "%sk", str);
            case 17: format(str, sizeof(str), "%sj", str);
            case 18: format(str, sizeof(str), "%sr", str);
            case 19: format(str, sizeof(str), "%ss", str);
            case 20: format(str, sizeof(str), "%st", str);
            case 21: format(str, sizeof(str), "%su", str);
            case 22: format(str, sizeof(str), "%sv", str);
            case 23: format(str, sizeof(str), "%sz", str);
            case 24: format(str, sizeof(str), "%sx", str);
            case 25: format(str, sizeof(str), "%sy", str);
            case 26: format(str, sizeof(str), "%sw", str);
            // Lettere maiuscole
            case 27: format(str, sizeof(str), "%sA", str);
            case 28: format(str, sizeof(str), "%sB", str);
            case 29: format(str, sizeof(str), "%sC", str);
            case 30: format(str, sizeof(str), "%sD", str);
            case 31: format(str, sizeof(str), "%sE", str);
            case 32: format(str, sizeof(str), "%sF", str);
            case 33: format(str, sizeof(str), "%sG", str);
            case 34: format(str, sizeof(str), "%sH", str);
            case 35: format(str, sizeof(str), "%sI", str);
            case 36: format(str, sizeof(str), "%sL", str);
            case 37: format(str, sizeof(str), "%sM", str);
            case 38: format(str, sizeof(str), "%sN", str);
            case 39: format(str, sizeof(str), "%sO", str);
            case 40: format(str, sizeof(str), "%sP", str);
            case 41: format(str, sizeof(str), "%sQ", str);
            case 42: format(str, sizeof(str), "%sK", str);
            case 43: format(str, sizeof(str), "%sJ", str);
            case 44: format(str, sizeof(str), "%sR", str);
            case 45: format(str, sizeof(str), "%sS", str);
            case 46: format(str, sizeof(str), "%sT", str);
            case 47: format(str, sizeof(str), "%sU", str);
            case 48: format(str, sizeof(str), "%sV", str);
            case 49: format(str, sizeof(str), "%sZ", str);
            case 50: format(str, sizeof(str), "%sX", str);
            case 51: format(str, sizeof(str), "%sY", str);
            case 52: format(str, sizeof(str), "%sW", str);
        }
    }
    return str;
}

Timers completely fuck up and start spamming functions

$
0
0
EDIT: FOUND A FIX

I was killing the wrong timer because I'm stupid, I'll go shoot myself right now.
Viewing all 18226 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>