Quantcast
Viewing all 18226 articles
Browse latest View live

[ayuda] come in and out

So, I created a command to / enter one interior, and I want to put that same command to enter other interiors too, I am doing something wrong because the command does not work, only the first interior. Help me there quickly please!


PHP Code:

CMD:entrar(playeridparams[]) //COMANDO DE ENTRAR LOJA DE ARMAS (/ENTRAR)
{
    if(
IsPlayerInRangeOfPoint(playerid3.01368.5051,-1279.8279,13.5469)) // aqui e a posicao da entrada loja de armas los santos
    
{
        
SetPlayerInterior(playerid6); //Aqui ï¿½ o modelo da loja de armas que escolhi de LS
        
SetPlayerPos(playerid296.919982, -108.071998,1001.515625); //Aqui e o ID da loja de armas de LS que escolhi
        
SendClientMessage(playerid, -1"Voce entrou na loja de armas."); //Mensagem ao entrar loja
      
    
}

     else if(
IsPlayerInRangeOfPoint(playerid3.01554.9099,-1675.5071,16.1953))
       {
        
SetPlayerInterior(playerid6);
        
SetPlayerPos(playerid246.783996,63.900199,1003.640625); 
        
SendClientMessage(playerid, -1"Voce entrou no departamento de policia de Los Santos.");
        
    }
    return 
1;




PUB Peaky Blinders

Hi.

This is a map created by me, along with the textures of the walls.
Can i ask for a +rep, for my work? :D

PUB Peaky Blinders: https://imgur.com/a/uaiKwya
TXD and MAP created by my.

Enum Random Spawn

I want to make random spawns using enum with ids.

Example
Code:

enum dsinfo
{
  id,
  Float:X,
  Float:Y,
  Float:Z,
};

new ds[][dsinfo] =
{
    {1, x, y, z},
    {1, x, y, z},
    {1, x, y, z},

    {2, x, y, z},
    {2, x, y, z},
};

Each id has a specific number of spawn coordinates.

If players joins ds ID 1 , the player should be spawned in any of those 3 coordinates. If Id 2, player should be spawned any of those 3 coordinates

How is it possible ?

PHP Code:

stock giveMoney(playeridamount)
{
    
Player[playerid][playerMoney] += amount;
    
ResetPlayerMoney(playerid);
    return 
GivePlayerMoney(playeridPlayer[playerid][playerMoney]);


This is my code for giving money to players. but still they can hack money like i saw one player getting $200m
in 5 or 6 scores. how is it possible and how can i prevent it ??

Helps appreciated.
Thank you.

Does anyone knows a Derby Server?

I am looking for a sever that has only derby. Any derby would do as long as it is available to play online for all. thanks :D

[Ajuda] Variável não muda o valor .

Code:

public OnGameModeInit()
{
        for(new i = 0; i < MAX_CASAS; i ++)
        {
            if (DOF2_FileExists(get_arquivo_casa ( i )))
            {
                        carregar_casa ( i );
                        printf("casa %d carregada dono %s preco %d aluguel %d", hInfo[i][h_numero_id] , hInfo[i][h_dono], hInfo[i][h_price], hInfo[i][h_aluguel]);
            }
        }

    return 1;
}

Image may be NSFW.
Clik here to view.


O ID das casas não carrega, o preço não carrega, nada carrega. Só o nome do dono.

Porem se eu alterar essa linha

Code:

printf("casa %d carregada dono %s preco %d aluguel %d", hInfo[i][h_numero_id] , hInfo[i][h_dono], hInfo[i][h_price], hInfo[i][h_aluguel]);
para :

Code:

printf("casa %d carregada dono %s preco %d aluguel %d", i , hInfo[i][h_dono], hInfo[i][h_price], hInfo[i][h_aluguel]);
olha a mágica:

Image may be NSFW.
Clik here to view.



então pensei, bom, as variáveis do enum não estão tendo os valores setados na carregar_casa () ...
indo lá checar :

Code:

carregar_casa( numero )
{
    if (DOF2_FileExists(get_arquivo_casa ( numero ) ))
    {
                format( hInfo[numero][h_dono] , MAX_PLAYER_NAME, "%s", DOF2_GetString( get_arquivo_casa( numero ), "dono" ) );
                format( hInfo[numero][h_morador] , MAX_PLAYER_NAME, "%s", DOF2_GetString( get_arquivo_casa( numero ), "morador" ) );

                hInfo[numero][h_numero_id]                                = DOF2_GetInt(get_arquivo_casa (numero), "numero");
                hInfo[numero][h_price]                                        = DOF2_GetInt(get_arquivo_casa (numero), "preco");
                hInfo[numero][h_aluguel]                                = DOF2_GetInt(get_arquivo_casa (numero), "aluguel");

                // Demais informações ...

                load_casa_info ( numero );
        }
}

Hmm, parece tudo OK com o DOF2_GetInt ... será que o problema está no get_arquivo_casa ?

Code:

get_arquivo_casa(numero)
{
    new a[30];
    format(a, sizeof(a), casas, numero);
    return a;
}

acho que não, pois ele lê o nome do dono ...
o problema está nas variáveis ?

Code:

enum InfoH
{
        h_dono[MAX_PLAYER_NAME],
    h_morador[MAX_PLAYER_NAME],
        h_numero_id,

        h_mundo,
        h_price,
        h_aluguel,
        h_interior,
        h_dbug_map,

        // demais variaveis ...

};

new hInfo[MAX_CASAS][InfoH];

parece que está tudo ok com as variáveis. a variavel price está correta, aluguel, então pq diabos os valores não são lidos ? Já editei 100x os arquivos da pasta casas, mesmo assim não ler.

salvamento:

Code:


salvar_casa( numero )
{
    if (!DOF2_FileExists(get_arquivo_casa ( numero )))
    {
        DOF2_CreateFile(get_arquivo_casa ( numero ));

                DOF2_SetString(get_arquivo_casa(numero), "h_dono",                                hInfo[numero][h_dono]);
            DOF2_SetString(get_arquivo_casa(numero), "h_morador",                        hInfo[numero][h_morador]);

        DOF2_SetInt(get_arquivo_casa  (numero), "h_numero_id",                hInfo[numero][h_numero_id]);
        DOF2_SetInt(get_arquivo_casa  (numero), "h_price",                        hInfo[numero][h_price]);
        DOF2_SetInt(get_arquivo_casa  (numero), "h_aluguel",                        hInfo[numero][h_aluguel]);

                // ...

                DOF2_SaveFile();
    }
    return 1;
}

pasta :

Image may be NSFW.
Clik here to view.


dentro do arquivo:

Image may be NSFW.
Clik here to view.



e detalhe: é só os valores de h_price, h_aluguel, h_numero_id que não são lidos, pois os floats que estão salvos são carregados e geram as pickups nos respectivos locais ...


passei a madrugada inteira acordado, tentando ver onde está o erro. não tem erro !
tudo compila, tudo funciona exceto a leitura dos valores na pasta, destes valores h_price, h_aluguel, h_numero_id .

ja mudei nome de variável, ja fiz de tudo .. não consigo entender !
quem souber o que está errado por favor, me de uma luz pf

Âîïðîñ ñ êîìïèëÿöèåé

Çäðàâñòâóéòå! Êàê ðåøèòü ïðîáëåìó ñ êîìïèëÿöèåé ìîäà, â ìîäå íåêîòîðûå ôóíêöèè (stock) ðàçáðîñàíû, ìíîãîå îáúÿâëåíî â ñàìîì íèçó ìîäà (çíàþ ýòî ïëîõî), íî ñóòü â òîì ÷òî ÿ âðîäå êàê íàø¸ë êàê ïîñòàâèòü ñîâìåñòèìîñòü è çàïóñòèòü ìîä â òàêîì âàðèàíòå, ïðîñòî ïåðåïèñàòü âñ¸ óéäåò óéìó âðåìåíè - ïîñòàâèë ïàðàìåòð - "-Z+", äàæå äîáàâèë ïðàãìó â ìîäå - #pragma compat 1, íî íè÷åãî, îïÿòü æå ýððîðû ñ ñîîáùåíèÿìè òèïà òàêîãî -

C:\Users\User\Desktop\2 ïàðòèÿ\/include/mod_news.inc(4329) : error 017: undefined symbol "PM"
C:\Users\User\Desktop\2 ïàðòèÿ\/include/mod_news.inc(4676) : error 017: undefined symbol "TogglePlayerControllableEx"
C:\Users\User\Desktop\2 ïàðòèÿ\MOD.pwn(1256) : error 017: undefined symbol "TogglePlayerControllableEx"
C:\Users\User\Desktop\2 ïàðòèÿ\MOD.pwn(1258) : error 017: undefined symbol "SendAdminLogMessage"


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


Ïðèìåðíî âîò òàê ó ìåíÿ â ìîäå íåêîòîðûå ôóíêöèè èñïîëüçóþòñÿ äî èõ îáúÿâëåíèÿ (ïðèì.) -
pawn Code:
function PlayerConnect(playerid) {
  checkBan(playerid);
}

stock checkBan(playerid) {
  code...
}

Çíàþ òàê êîäèòü ïëîõî, è êîìïèëÿòîð âûäà¸ò îøèáêó, íî êàê ðàçðåøèòü òàêîå ÷åðåç ïàðàìåòðû èëè êàê ìîæíî âîîáùå ñäåëàòü òàêîå?

log-core.so

I don't know what happened or what's happening, but suddently log-core.so plugin stopped to work:

Quote:

[19:00:49] Loading plugin: log-core.so
[19:00:49] Plugin does not conform to architecture.
The OS of my VPS has never changed, CentOS 7 64 bit.

What's wrong? Server is working fine but after some time it freezes and i have to restart it.

Mysql error log is empty.

[Ajuda] Setar Player no OBJETO

PHP Code:

/*  surfboard.inc
 *
 *  (c) Copyright 2010, Emilijo "Correlli" Lovrich
 *
 *  Credits: - ****** for foreach & GetXYInFrontOfPlayer functions & ZeeX for zcmd command processor.
*/

#if defined _surfboard_included
    #endinput
#endif
#define _surfboard_included

#if !defined _samp_included
    #error "You'll need to include the a_samp.inc include file before the surfboard.inc file!"
#endif

/* ----- */

#if !defined MAX_SURFBOARDS
    #define MAX_SURFBOARDS (5)
#endif

#if !defined MAX_SURFBOARD_SPEED
    #define MAX_SURFBOARD_SPEED (14.0)
#endif

#if !defined INVALID_SURFBOARD_ID
    #define INVALID_SURFBOARD_ID (-1)
#endif

/* ----- */

static
        
bool:gOPF[3] = false;

/* ----- */

enum dataSurfboard
{
    
modelID,
    
objectID,
    
Float:speed,
    
Float:position[7]
}

new
        
surfboardID INVALID_SURFBOARD_IDsurfboardData[MAX_SURFBOARDS][dataSurfboard],
        
Float:surfboardGoTo[MAX_SURFBOARDS][3], bool:firstSurfboard falsesbTimer;

/* ----- */

stock CreateSurfboard(modelidFloat:xFloat:yFloat:zFloat:rxFloat:ryFloat:rz 0.0)
{
    
surfboardID++;
    if(
surfboardID == MAX_SURFBOARDS)
    {
        
printf("Limit of surfboards exceeded. Open the surfboard.inc and change the \"MAX_SURFBOARDS\" define to bigger value if you want to have more surfboards.\
                \nDon't forget that object limit in the current SA:MP version (0.3b) is 400, so it's a good thing to use an object-streamer if you're having many surfboards on server."
);
        
surfboardID--;
        return 
INVALID_SURFBOARD_ID;
    }
    new
            
toSurfboardID GetFreeSurfboardID();
    if(
toSurfboardID == INVALID_SURFBOARD_ID)
    {
        print(
"Error: There are no surfboard IDs free.");
        
surfboardID--;
        return 
INVALID_SURFBOARD_ID;
    }
    if(
modelid || modelid 3)
    {
        
printf("Invalid model-ID at function \"CreateSurfboard\". Valid model-IDs are 1, 2 and 3.");
        
surfboardID--;
        return 
INVALID_SURFBOARD_ID;
    }
    
surfboardData[toSurfboardID][modelID] = modelid;
    
surfboardData[toSurfboardID][position][0] = x;
    
surfboardData[toSurfboardID][position][1] = y;
    
surfboardData[toSurfboardID][position][2] = z;
    
surfboardData[toSurfboardID][position][3] = rx;
    
surfboardData[toSurfboardID][position][4] = ry;
    
surfboardData[toSurfboardID][position][5] = rz;
    
surfboardData[toSurfboardID][position][6] = rz;
    
surfboardData[toSurfboardID][speed] = 0.0;
    
surfboardData[toSurfboardID][objectID] = CreateObject(2403 modelidxyzrxryrz);
    if(!
firstSurfboard)
    {
        
firstSurfboard true;
        
sbTimer SetTimer("surfboard_Timer"1000true);
    }
    return 
toSurfboardID;
}

stock DestroySurfboard(sbid)
{
    if(
IsSurfboardCreated(sbid))
    {
        
surfboardID--;
        
surfboardData[sbid][modelID] = 0;
        
surfboardData[sbid][position][0] = 0.0;
        
surfboardData[sbid][position][1] = 0.0;
        
surfboardData[sbid][position][2] = 0.0;
        
surfboardData[sbid][position][3] = 0.0;
        
surfboardData[sbid][position][4] = 0.0;
        
surfboardData[sbid][position][5] = 0.0;
        
surfboardData[sbid][position][6] = 0.0;
        
surfboardData[sbid][speed] = 0.0;
        
DestroyObject(surfboardData[sbid][objectID]);
        if(
surfboardID == INVALID_SURFBOARD_ID)
        {
            
firstSurfboard false;
            
KillTimer(sbTimer);
        }
        foreach(
Playeru)
        {
            if((
GetPVarInt(u"surfboardID") - 1) == sbid)
            {
                
SetPVarInt(u"surfboardID"0);
                
ClearAnimations(u);
                
SendClientMessage(u0xFFFFFFFF"Surfing stopped - surfboard was deleted by the script.");
                break;
            }
        }
        return 
true;
    }
    return 
false;
}

stock IsSurfboardCreated(sbid)
{
    if(
surfboardData[sbid][modelID]) return true;
    return 
false;
}

stock GetNumberOfSurfboards() return surfboardID;

stock GetFreeSurfboardID()
{
    new
            
sbid INVALID_SURFBOARD_ID;
    for(new 
0MAX_SURFBOARDSa++)
    {
        if(!
IsSurfboardCreated(a))
        {
            
sbid a;
            break;
        }
    }
    return 
sbid;
}

stock StopSurfboard(sbid)
{
    if(!
IsSurfboardCreated(sbid)) return false;
    
surfboardData[sbid][speed] = 0.0;
    
StopObject(surfboardData[sbid][objectID]);
    return 
true;
}

stock RespawnSurfboard(sbid)
{
    if(!
IsSurfboardCreated(sbid)) return false;
    
DestroyObject(surfboardData[sbid][objectID]);
    
surfboardData[sbid][position][5] = surfboardData[sbid][position][6];
    
surfboardData[sbid][objectID] = CreateObject(2403 surfboardData[sbid][modelID], surfboardData[sbid][position][0], surfboardData[sbid][position][1], surfboardData[sbid][position][2], surfboardData[sbid][position][3], surfboardData[sbid][position][4], surfboardData[sbid][position][5]);
    return 
true;
}

stock SetSurfboardSpeed(sbidFloat:surfspeed MAX_SURFBOARD_SPEED)
{
    if(!
IsSurfboardCreated(sbid)) return false;
    if(
surfspeed MAX_SURFBOARD_SPEEDsurfboardData[sbid][speed] = MAX_SURFBOARD_SPEED;
    else 
surfboardData[sbid][speed] = surfspeed;
    return 
true;
}

stock IsPlayerAtSurfboard(playeridsbid)
{
    new
            
Float:pos[3];
    
GetObjectPos(surfboardData[sbid][objectID], pos[0], pos[1], pos[2]);
    if(
IsPlayerInRangeOfPoint(playerid1.5pos[0], pos[1], pos[2])) return true;
    return 
false;
}

stock IsPlayerAtAnySurfboard(playerid)
{
    new
            
0;
    for(
0MAX_SURFBOARDSa++)
    {
        if(
IsPlayerAtSurfboard(playerida)) return a;
    }
    return 
INVALID_SURFBOARD_ID;
}

stock IsSurfboardOccupied(sbid)
{
    if(!
IsSurfboardCreated(sbid)) return INVALID_PLAYER_ID;
    foreach(
Playeru)
    {
        if((
GetPVarInt(u"surfboardID") - 1) == sbid) return u;
    }
    return 
INVALID_PLAYER_ID;
}

/* ----- */

stock GetXYInFrontOfPlayerOnSB(playerid, &Float:x, &Float:yFloat:distance)
{
    new
            
Float:angle;
    
GetPlayerPos(playeridxyangle);
    
GetPlayerFacingAngle(playeridangle);
    
+= (distance floatsin(-angle 270.0degrees));
    
+= (distance floatcos(-angle 270.0degrees));
}

/* ----- */

forward surfboard_Timer();
public 
surfboard_Timer()
{
    foreach(
Playeru)
    {
        new
                
sbid GetPVarInt(u"surfboardID") - 1;
        if(
sbid != INVALID_SURFBOARD_ID)
        {
            if(!
IsPlayerAtSurfboard(usbid))
            {
                
StopSurfboard(sbid);
                
RespawnSurfboard(sbid);
                
SetPVarInt(u"surfboardID"0);
                
ClearAnimations(u);
                
SendClientMessage(u0xFFFFFFFF"Surfing stopped - surfboard is re-spawned.");
            }
        }
    }
    return 
true;
}

/* ----- */

command(surfplayeridparams[])
{
    new
            
Float:objPos[3];
    if(!
GetPVarInt(playerid"surfboardID"))
    {
        new
                
sbid IsPlayerAtAnySurfboard(playerid); 
        if(
sbid != INVALID_SURFBOARD_ID)
        {
            new
                    
isOccupied IsSurfboardOccupied(sbid);
            if(
isOccupied != INVALID_PLAYER_ID) return SendClientMessage(playerid0xFFFFFFFF"(surfing) Someone is already surfing on this surfboard!");
            
SetPVarInt(playerid"surfboardID"sbid 1);
            
GetObjectPos(surfboardData[sbid][objectID], objPos[0], objPos[1], objPos[2]);
            
SetPlayerPos(playeridobjPos[0], objPos[1], objPos[2] + 1.0);
            
SetPlayerFacingAngle(playeridsurfboardData[sbid][position][5] + 270.0); // seta o player pro angulo
            
ApplyAnimation(playerid"BSKTBALL""BBALL_def_loop"4.010000);
            
SendClientMessage(playerid0xFFFFFFFF"Surfing started. Use \"/surf\" command to stop with the surfing.");
        }
        else 
SendClientMessage(playerid0xFFFFFFFF"You're not near any surfboard or you're not close enough to it.");
    }
    else
    {
        
StopSurfboard(GetPVarInt(playerid"surfboardID") - 1);
        
SetPVarInt(playerid"surfboardID"0);
        
ClearAnimations(playerid);
        
SendClientMessage(playerid0xFFFFFFFF"Surfing stopped. Use \"/surf\" command to start with the surfing again.");
    }
    return 
true;
}

/* ----- */

public OnPlayerConnect(playerid)
{
    
ApplyAnimation(playerid"BSKTBALL""null"0.000000);

    if(
gOPF[0]) CallLocalFunction("surfboard_OnPlayerConnect""i"playerid);
    return 
true;
}

#if defined _ALS_OnPlayerConnect
    #undef OnPlayerConnect
#else
    #define _ALS_OnPlayerConnect
#endif
#define OnPlayerConnect surfboard_OnPlayerConnect

forward surfboard_OnPlayerConnect(playerid);



public 
OnPlayerDisconnect(playeridreason)
{
    new
            
sbid GetPVarInt(playerid"surfboardID") - 1;
    if(
sbid != INVALID_SURFBOARD_ID)
    {
        
StopSurfboard(sbid);
        
RespawnSurfboard(sbid);
    }

    if(
gOPF[1]) CallLocalFunction("surfboard_OnPlayerDisconnect""ii"playeridreason);
    return 
true;
}

#if defined _ALS_OnPlayerDisconnect
    #undef OnPlayerDisconnect
#else
    #define _ALS_OnPlayerDisconnect
#endif
#define OnPlayerDisconnect surfboard_OnPlayerDisconnect

forward surfboard_OnPlayerDisconnect(playeridreason);



public 
OnPlayerUpdate(playerid)
{
    new
            
sbid GetPVarInt(playerid"surfboardID") - 1;
    if(
sbid != INVALID_SURFBOARD_ID)
    {
        new
                
keys[3], Float:floatVal[4];
        
GetPlayerPos(playeridfloatVal[0], floatVal[1], floatVal[2]);
        
floatVal[3] = surfboardData[sbid][speed];
        
GetPlayerKeys(playeridkeys[0], keys[1], keys[2]);
        
GetXYInFrontOfPlayerOnSB(playeridfloatVal[0], floatVal[1], 90.0);
        
surfboardGoTo[sbid][0] = floatVal[0];
        
surfboardGoTo[sbid][1] = floatVal[1];
        
surfboardGoTo[sbid][2] = surfboardData[sbid][position][2];
        if(
keys[1] == KEY_UP)
        {
            if(
floatVal[3] >= 0.0 && floatVal[3] < MAX_SURFBOARD_SPEEDsurfboardData[sbid][speed] += 0.09;
            if(
floatVal[3] >= MAX_SURFBOARD_SPEEDsurfboardData[sbid][speed] = MAX_SURFBOARD_SPEED;
        }
        else if(
keys[1] == KEY_DOWN)
        {
            if(
floatVal[3] >= 0.0 && floatVal[3] < MAX_SURFBOARD_SPEEDsurfboardData[sbid][speed] -= 0.09;
            if(
floatVal[3] >= MAX_SURFBOARD_SPEEDsurfboardData[sbid][speed] = MAX_SURFBOARD_SPEED;
        }
        if(
keys[2] == KEY_LEFT)
        {
            
surfboardData[sbid][speed] -= 0.01;
            
surfboardData[sbid][position][5] += 1.5;
            
SetObjectRot(surfboardData[sbid][objectID], surfboardData[sbid][position][3], surfboardData[sbid][position][4], surfboardData[sbid][position][5]);
            
SetPlayerFacingAngle(playeridsurfboardData[sbid][position][5] + 270.0);
            
surfboardGoTo[sbid][0] = floatVal[0];
            
surfboardGoTo[sbid][1] = floatVal[1];
            
surfboardGoTo[sbid][2] = surfboardData[sbid][position][2];
        }
        else if(
keys[2] == KEY_RIGHT)
        {
            
surfboardData[sbid][speed] -= 0.01;
            
surfboardData[sbid][position][5] -= 1.5;
            
SetObjectRot(surfboardData[sbid][objectID], surfboardData[sbid][position][3], surfboardData[sbid][position][4], surfboardData[sbid][position][5]);
            
SetPlayerFacingAngle(playeridsurfboardData[sbid][position][5] + 270.0);
            
surfboardGoTo[sbid][0] = floatVal[0];
            
surfboardGoTo[sbid][1] = floatVal[1];
            
surfboardGoTo[sbid][2] = surfboardData[sbid][position][2];
        }
        if(
surfboardData[sbid][speed] > 0.009)
        {
            
surfboardData[sbid][speed] -= 0.009;
            
MoveObject(surfboardData[sbid][objectID], surfboardGoTo[sbid][0], surfboardGoTo[sbid][1], surfboardGoTo[sbid][2], surfboardData[sbid][speed]);
        }
        else 
StopSurfboard(sbid);
        new
                
string[72];
        
format(stringsizeof(string), "~n~~n~~n~~n~~n~~n~~n~~n~~n~~r~Speed: ~w~%0.1f ~r~/ ~w~%0.1f"surfboardData[sbid][speed], MAX_SURFBOARD_SPEED);
        
GameTextForPlayer(playeridstring10003);
    }

    if(
gOPF[2]) CallLocalFunction("surfboard_OnPlayerUpdate""i"playerid);
    return 
true;
}

#if defined _ALS_OnPlayerUpdate
    #undef OnPlayerUpdate
#else
    #define _ALS_OnPlayerUpdate
#endif
#define OnPlayerUpdate surfboard_OnPlayerUpdate

forward surfboard_OnPlayerUpdate(playerid);



public 
OnGameModeInit()
{
    
gOPF[0] = (funcidx("surfboard_OnPlayerConnect") != -1);
    
gOPF[1] = (funcidx("surfboard_OnPlayerDisconnect") != -1);
    
gOPF[2] = (funcidx("surfboard_OnPlayerUpdate") != -1);
    
CallLocalFunction("surfboard_OnGameModeInit""");
}

#if defined _ALS_OnGameModeInit
    #undef OnGameModeInit
#else
    #define _ALS_OnGameModeInit
#endif
#define OnGameModeInit surfboard_OnGameModeInit

forward surfboard_OnGameModeInit(); 


Gostaria de saber qual comando foi Usado pra setar o Player em cima do Objeto.

[Ajuda] Setar o Player e setar objeto

Gostaria de saber como ao utilizar um comando setar determinado objeto no local em que esse comando foi digitado, e como em tempo consecutivo setar o player em cima desse objeto criado, alguém sabe dizer?

[Tool/Web/Other] SA-MP RCON (Xamarin.Forms App)

Image may be NSFW.
Clik here to view.

Description:
This application has been developed with C # and Xamarin.Forms, it is currently compatible with Android, in the future if the application is well received by the community, it could be launched for IOS, UWP and Tizen with little effort since most of the code is shared. In the last few days I have had a vacation and wanted to develop something for the SA-MP community (which I have been following for a long time), from what I have seen, the mobile applications to send existing RCON commands in the community are mainly web versions and few Mobile phone versions are outdated, so I decided to develop a modern, open source, ad-free application (I have PayPal for anyone who wants to donate). Currently it has the most basic functions, more functions will be added with each update, you can leave suggestions in the comments. The application is available in English, Spanish and Russian.

YouTube:
YouTube video



Images:
Image may be NSFW.
Clik here to view.


Image may be NSFW.
Clik here to view.


Image may be NSFW.
Clik here to view.


Image may be NSFW.
Clik here to view.


Image may be NSFW.
Clik here to view.


Image may be NSFW.
Clik here to view.


Image may be NSFW.
Clik here to view.


Image may be NSFW.
Clik here to view.

RCON Commands:
List of available RCON commands

Change Log:
https://www.nacompllo.com/p/sa-mp-rcon.html

Credits:
Xamarin.Forms app developed by Nacompllo.
SACNR Monitor API
RCON Query Mechanism example

Icons:
bqlqn
Freepik

Donation:
If you like the open source project SA-MP RCON and want to continue receiving maintenance, new features and support for new platforms, you can help with a donation through PayPal.

Downloads:
GitHub
En GitHub puede descargar el código del proyecto y también encontrará un enlace para descargar la aplicación desde la tienda de Android.

SSCANF Version

i need the old version of sscanf.

Because in the last version there is an INVALID PLAYER ID error.

[Ajuda] inventario

Fala galera, tenho um sistema de inventario e queria passar ele pra dialog.
vocês tem ideia de como fazer isso?

3DTextLabel design, simple question i think

How can i make this 3dtext label that looks like this
https://prnt.sc/s2ddc0

to look like this.
https://prnt.sc/s2ddk9
this one has an outline, i want the first one to have it too..

the code for first one
PHP Code:

    format(stringsizeof(string), "{ffffff}Job ID: {ff0000}%d{FFFFFF}\n{ffffff}Job: {ff0000}%s{FFFFFF}\n{ffffff}Owner: {ff0000}%s{FFFFFF}\nLevel: {ff0000}%d{FFFFFF}\nPress {ff0000}Y{FFFFFF} to get the job\nPress {ff0000}N{FFFFFF} to quit job"jobJobInfo[job][jName], JobInfo[job][jOwner], JobInfo[job][jLevel]);
    
JobInfo[job][jLabel] = CreateDynamic3DTextLabel(string0xFFFFFF00JobInfo[job][jPosX], JobInfo[job][jPosY], JobInfo[job][jPosZ], 25INVALID_PLAYER_IDINVALID_VEHICLE_ID0, -1, -1, -1100.0); 

the code for the second
PHP Code:

    CreateDynamic3DTextLabel("{ff4000}Trucker Workplace\n{FFFFFF}Scrie {ff4000}[/work]{ffffff} pentru a incepe munca!", -12818.7141,915.2484,10.75005.0INVALID_PLAYER_IDINVALID_VEHICLE_ID0, -1, -1, -1100.0); 

can somebody explain what every parameter of Dynamic3dtextLabel means? short description.. internet kinda not helped me too much. im still searching.

Hello I need help with pawn.

Do you have filterscript for in game voice system, this system needs to be connected with teamspeak, in game need to have locations id and on teamspeak bot when you go in another location ID, bot move you in team speak channel which has the name of that location??

If you can help me! Thanks!

[Ajuda] LagComp & Sensor de Hit

Bom Dia, Boa tarde ou Boa noite. Sou iniciante no samp, apesar da conta com um tempo bom já hahaha.
E estou começando a entrar e estudar o pawno.

Então estou aqui para saber como resolver esses 2 problemas que não consegui solucionar, desde já agradeço a atenção dos que puderem responder e ajudar.

1° Quero colocar o x1 sem arma (soco, chute e etc) no ant lag, ou seja, quero que NÃO SEJA NA SKIN.

2° Eu precisava de uma função ou CallBack que "indica-se" quando o Player toma um hit, ataque, mesmo que não tenha tomado dano, então nesse caso não vale de nada a OnPlayerTakeDamage e a OnPlayerGiveDamage. Pesquisei muito e não achei, alguma função própria do pawno ou alguma include com essa característica.

[Ajuda] Problemas ao ligar server

Estou enfrentando problemas ao ligar o servidor depois dessa atualização, ja atualizei todos os ficheiros, instalei a ultima atualização do samp e sempre da o mesmo erro de nao conectar.

Pushing Help

Hi
i need help with minigames area
Code:

#define MAX_ZONES 3

new zones[MAX_ZONES];
new Float:zones_points_0[] = {
        852.0,3001.0,856.0,1981.0,860.0,1113.0,956.0,961.0,976.0,721.0,1076.0,661.0,1240.0,653.0,1344.0,629.0,1396.0,609.0,1484.0,621.0,
        1740.0,621.0,1812.0,577.0,1940.0,553.0,2088.0,569.0,2228.0,561.0,2548.0,569.0,2776.0,605.0,2892.0,641.0,2948.0,725.0,2968.0,865.0,
        2992.0,1041.0,2984.0,1345.0,2984.0,1793.0,2988.0,2301.0,2992.0,2657.0,2972.0,2729.0,2972.0,2781.0,2952.0,2865.0,2916.0,2929.0,2876.0,2977.0,
        852.0,3001.0
};
new Float:zones_points_1[] = {
        65.0,-1550.0,70.0,-1513.0,143.0,-1406.0,110.0,-1323.0,112.0,-1260.0,189.0,-1070.0,254.0,-992.0,525.0,-884.0,733.0,-766.0,849.0,-652.0,
        968.0,-609.0,1164.0,-587.0,1287.0,-489.0,1500.0,-400.0,1753.0,-424.0,1801.0,-661.0,1929.0,-817.0,2224.0,-928.0,2422.0,-906.0,2643.0,-905.0,
        2925.0,-904.0,2922.0,-1092.0,2916.0,-1155.0,2934.0,-1274.0,2959.0,-1445.0,2938.0,-1555.0,2900.0,-1670.0,2877.0,-1768.0,2878.0,-1821.0,2885.0,-1843.0,
        2903.0,-1873.0,2901.0,-2149.0,2858.0,-2219.0,2799.0,-2249.0,2764.0,-2240.0,2767.0,-2180.0,2430.0,-2180.0,2402.0,-2196.0,2343.0,-2247.0,2210.0,-2383.0,
        2186.0,-2444.0,2185.0,-2566.0,2173.0,-2628.0,2142.0,-2664.0,2087.0,-2693.0,1945.0,-2698.0,1694.0,-2699.0,1437.0,-2698.0,1365.0,-2671.0,1325.0,-2606.0,
        1322.0,-2513.0,1190.0,-2461.0,1031.0,-2323.0,1013.0,-2251.0,983.0,-2142.0,976.0,-1984.0,961.0,-1909.0,908.0,-1892.0,758.0,-1885.0,496.0,-1886.0,
        241.0,-1885.0,144.0,-1882.0,146.0,-1800.0,95.0,-1726.0,81.0,-1613.0,91.0,-1580.0,65.0,-1550.0
};
new Float:zones_points_2[] = {
        -2996.0,1527.0,-2992.0,-553.0,-1728.0,-629.0,-1616.0,-697.0,-1224.0,-693.0,-1224.0,-529.0,-1128.0,-433.0,-1116.0,-333.0,-1132.0,-233.0,-1080.0,-213.0,
        -1196.0,-25.0,-1160.0,35.0,-1244.0,127.0,-1192.0,191.0,-1216.0,227.0,-988.0,451.0,-1036.0,495.0,-1424.0,127.0,-1436.0,255.0,-1312.0,295.0,
        -1316.0,423.0,-1208.0,419.0,-1196.0,495.0,-1480.0,539.0,-1400.0,1103.0,-1420.0,1319.0,-1560.0,1467.0,-1664.0,1575.0,-2224.0,1523.0,-2996.0,1527.0
};
new zones_text[MAX_ZONES][64] = {
        "LVPTP",
        "LSPTP",
        "SFPTP"
};


public OnFilterScriptInit() {

        zones[0] = CreateDynamicPolygon(zones_points_0);
        zones[1] = CreateDynamicPolygon(zones_points_1);
        zones[2] = CreateDynamicPolygon(zones_points_2);

        return 1;
}

public OnFilterScriptExit() {
        return 1;
}

public OnPlayerEnterDynamicArea(playerid, areaid) {
        for (new zone=0; zone<MAX_ZONES; zone++) {
                if (areaid==zones[zone]) {
                        new msg[90];
                        format(msg, 90, "Welcome to %s", zones_text[zone]);
                        SendClientMessage(playerid, 0xFFFFFFFF, msg);
                }
        }
        return 1;
}

public OnPlayerLeaveDynamicArea(playerid, areaid) {
        for (new zone=0; zone<MAX_ZONES; zone++) {
                if (areaid==zones[zone]) {
                        new msg[90];
                        format(msg, 90, "Goodbye from %s", zones_text[zone]);
                        SendClientMessage(playerid, 0xFFFFFFFF, msg);
                }
        }
        return 1;
}

when the player was out of area. The server pushing it to the area range
Code:

public OnPlayerLeaveDynamicArea(playerid, areaid)
{
when the player was out of area. The server pushing it to the area range
}

PlayerTextDrawSetSelectable dont work

hi guys, i am trying to click this textdraw but it doesn't work for me, does anyone know why?

PHP Code:

new PlayerText:Login_NIGGAS[MAX_PLAYERS];

public 
OnPlayerConnect(playerid)
{
         
    
Login_NIGGAS[playerid] = CreatePlayerTextDraw(playerid23.500000327.666656"box");
    
PlayerTextDrawLetterSize(playeridLogin_NIGGAS[playerid], 0.0000000.000000);
    
PlayerTextDrawAlignment(playeridLogin_NIGGAS[playerid], 1);
    
PlayerTextDrawTextSize(playeridLogin_NIGGAS[playerid], 41.540.977760);
    
PlayerTextDrawColor(playeridLogin_NIGGAS[playerid], -1);
    
PlayerTextDrawSetShadow(playeridLogin_NIGGAS[playerid], 0);
    
PlayerTextDrawSetOutline(playeridLogin_NIGGAS[playerid], 0);
    
PlayerTextDrawFont(playeridLogin_NIGGAS[playerid],  TEXT_DRAW_FONT_MODEL_PREVIEW);
    
PlayerTextDrawSetPreviewModel(playeridLogin_NIGGAS[playerid], 21);    
    
PlayerTextDrawShow(playeridLogin_NIGGAS[playerid]);
    
PlayerTextDrawUseBox(playeridLogin_NIGGAS[playerid], 1);
    
PlayerTextDrawBoxColor(playeridLogin_NIGGAS[playerid], 0x00000011);
    
PlayerTextDrawSetSelectable(playeridLogin_NIGGAS[playerid], 1);
    
SelectTextDraw(playeridcolor_RED);       

return 
1;


PHP Code:

public OnPlayerClickPlayerTextDraw(playeridPlayerText:playertextid)
{

if(
playertextid == Login_NIGGAS[playerid])
{
Print(
"test");

// code 

Multiple Account by IP issue

Hi, my gamemode is using Mysql 39-3 and I would like to limtit the number of accounts to 2 by IP. Everything is compile fine but still I can create many account as I want. Someone can help me?

This is my code:
Code:

#define MAX_ACCOUNT_IP 1


forward MySQLCheckIp(ip[]);
public MySQLCheckIp(ip[])
{
    new
        query[300];

        mysql_format(g_iHandle, query, sizeof(query), "SELECT ID FROM `characters` WHERE `IP` = '%s'", ip);
        mysql_query(g_iHandle, query);
        new tmp = 0;
        cache_get_row_count(tmp);
        if(tmp >= MAX_ACCOUNT_IP)
                {return true;}
        return false;
       
       
public OnPlayerRequestClass(playerid, classid)
{
        if (IsPlayerNPC(playerid))
        return 1;
       
        if(MySQLCheckIp(PlayerData[playerid][pIP]))
        {
                SendClientMessage(playerid, COLOR_ERROR, "Vous avez été kick car le serveur est limité à 3 comptes par IP.");
                KickEx(playerid);
                return 1;
        }
        if (!PlayerData[playerid][pAccount] && !PlayerData[playerid][pKicked])
        {
                new
                time[3];

                gettime(time[0], time[1], time[2]);
                SetPlayerTime(playerid, time[0], time[1]);

                PlayerData[playerid][pAccount] = 1;
                TogglePlayerSpectating(playerid, 1);

                SetPlayerColor(playerid, COLOR_WHITE);
                SetTimerEx("AccountCheck", 400, false, "d", playerid); // 400 ms
        }
        return 1;
}

Thanks for the help!
Viewing all 18226 articles
Browse latest View live


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