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

[Ajuda] Minha GM não Carrega

$
0
0
Bom ao executar minha GM no samp-server ela carrega tudo e no final ela fecha , faz 2 meses que não consigo resolver esse problema se alguem pode me ajudar !!

server_log

PHP Code:

----------
Loaded log file"server_log.txt".
----------

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

[16:07:53password ""  (string)
[
16:07:53weburl "www.sa-mp.com"  (string)
[
16:07:53
[
16:07:53Server Plugins
[16:07:53] --------------
[
16:07:53]  Loading pluginstreamer
[16:07:53

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

[
16:07:53]   Loaded.
[
16:07:53]  Loading pluginsscanf
[16:07:53

[
16:07:53]  ===============================

[
16:07:53]       sscanf plugin loaded.     

[
16:07:53]          Version:  2.8.2        

[16:07:53]    (c2012 Alex "******" Cole  

[16:07:53]  ===============================

[
16:07:53]   Loaded.
[
16:07:53]  Loaded 2 plugins.

[
16:07:53
[
16:07:53Filterscripts
[16:07:53] ---------------
[
16:07:53]   Loading filterscript 'Favela.amx'...
[
16:07:53]   Loaded 1 filterscripts.

[
16:07:53]  
[
16:07:53]  
[
16:07:53]  
[
16:07:53]  ======================================= 
[
16:07:53]  |                                     | 
[
16:07:53]  |        YSI version 4.00.0001        
[
16:07:53]  |        By Alex "******" Cole        
[
16:07:53]  |                                     | 
[
16:07:53]  ======================================= 
[
16:07:53]  
[
16:07:541573315674
[16:07:54] [INFOServidor Aberto!
[
16:07:54] [SUCESSOConfigurações carregadas


[Tutorial] How to make a Building System

$
0
0
Hi!
I want to show you how you can create a Building System with an enum and an Automated enter/exit system with ZCMD and Pickups.


First you have to create the enum:

Code:

enum BuildingInfo {
        Float:benterx,
        Float:bentery,
        Float:benterz,
        Float:bexitx,
        Float:bexity,
        Float:bexitz,
        bInterior,
        bName[128]
}

You can customize it of course :D i have the coordinates for the Pickups and the Enter/Exit Coordinates,Interior and Name of the Building

now you can create the Array for the enum, so you can enter your own Informations and coordinates

Code:

new bInfo[][BuildingInfo] = {
{2337.1052,2458.4021,14.9688,238.6867,140.1222,1003.0234,3,"LVPD HQ"}
};

That's the LVPD for example, you have to put the Information exactly as the enum is, so the Enter Coordinates are first, than the exit coordinates, the interior,and the name.

The Name is for the Pickup, where a Text is placed at GameMode Start

You can do this like shown here:

Code:

DisableInteriorEnterExits();
for(new i=0; i<sizeof(bInfo); i++)
{
        new string[128];
        format(string,sizeof(string),"/enter or Key F to leave the Building:\n%s",bInfo[i][bName]);
        CreatePickup(1318, 1, bInfo[i][benterx], bInfo[i][bentery], bInfo[i][benterz], -1);
        Create3DTextLabel(string, COLOR_WHITE, bInfo[i][benterx], bInfo[i][bentery], bInfo[i][benterz], 30, 0);
        format(string,sizeof(string),"/exit or Key F to enter the Building:\n%s",bInfo[i][bName]);
        CreatePickup(1318, 1, bInfo[i][bexitx],bInfo[i][bexity], bInfo[i][bexitz],-1);
        Create3DTextLabel(string, COLOR_WHITE, bInfo[i][bexitx], bInfo[i][bexity], bInfo[i][bexitz], 30, 0);
}

if you have this under OnGameModeInit, it will create the pickups and Text for all Buildings, that you have in the enum, so it does it easy for you.

Now we create the Command for the enter Exit System:

Code:

CMD:exit(playerid)
{
        for(new i=0; i<sizeof(bInfo); i++)
        {
                if(!IsPlayerInRangeOfPoint(playerid, 5, bInfo[i][bexitx], bInfo[i][bexity], bInfo[i][bexitz]))continue;
                if(IsPlayerInAnyVehicle(playerid))continue;
                SetPlayerInterior(playerid, 0);
                SetPlayerPos(playerid, bInfo[i][benterx], bInfo[i][bentery], bInfo[i][benterz]);
                return 1;
        }
        return 1;
}

CMD:enter(playerid)
{
        for(new i=0; i<sizeof(bInfo); i++)
        {
                if(!IsPlayerInRangeOfPoint(playerid, 5, bInfo[i][benterx], bInfo[i][bentery], bInfo[i][benterz]))continue;
                if(IsPlayerInAnyVehicle(playerid))continue;
                SetPlayerInterior(playerid, bInfo[i][bInterior]);
                SetPlayerPos(playerid, bInfo[i][bexitx], bInfo[i][bexity], bInfo[i][bexitz]);
                return 1;
        }
        return 1;
}

so now, you can enter and exit any building with this commands. It will automatically check every Building and see if you are in range of the enter or exit point,and it will put you in the right building and interior.

To enter a building with the Key "F" or "ENTER" you put the following under OnPlayerKeyStateChange

Code:

if(newkeys == KEY_SECONDARY_ATTACK)
{
        cmd_enter(playerid);
        cmd_exit(playerid);
        return 1;
}

This was my first tutorial, so don't be so bad to me xD i know my english isn't that great,but i hope you will understand the tutorial, it is more for experienced scripters than for beginners.

Help case sex

$
0
0
Hello, good friends, update my GM's mysql to mysql r41-4, but I have a problem that when selecting the male sex, the male character comes out but when reviewing he has the female sex, and when I create sex of Female sex comes out of man, what would be the mistake?

Here is my sex code:

pawn Code:
case SEXO:
        {
            if(response)
            {
                switch(listitem)
                {
                    case 0:
                    {
                        PlayerInfo[playerid][jSexo] = 1;
                        PlayerInfo[playerid][jSexo] = 1;
                        PlayerInfo[playerid][jSexo] = 1;
                        PlayerInfo[playerid][pSed] = 0;
                        PlayerInfo[playerid][pHambre] = 0;
                        SetPlayerName(playerid, PlayerInfo[playerid][NombreTemporal]);
                    }
                    case 1:
                    {
                        PlayerInfo[playerid][jSexo] = 2;
                        PlayerInfo[playerid][jSexo] = 2;
                        PlayerInfo[playerid][jSexo] = 2;
                        PlayerInfo[playerid][pSed] = 0;
                        PlayerInfo[playerid][pHambre] = 0;
                        SetPlayerName(playerid, PlayerInfo[playerid][NombreTemporal]);
                    }
                }
                new pQuery[256];
                mysql_format(Conecction, pQuery, sizeof(pQuery), "SELECT * FROM `usuarios` WHERE `Username` = '%s'", PlayerInfo[playerid][NombreTemporal]);
                mysql_pquery(Conecction, pQuery, "OnPlayerRegister", "d", playerid);
            }
            else ExpulsarJugador(playerid,"Escape en registro.");
        }

Speedometer Textdraw

$
0
0
Can anyone draw such a speedometer?

[Ajuda] /Capacete

$
0
0
Preciso de ajuda meu /capacete não funciona eu fiz ele e quando eu do o comando aparece que colocou no chat mais não aparece nada quando fui arrumar o capacete na cabeça tbm não arrumou
HTML Code:

CMD:capacete(playerid, params[])
{
    GetPlayerName(playerid, Nome, sizeof(Nome));
    format(PlayerFile, sizeof(PlayerFile), "Players/%s.ini", Nome);
    if(DOF2_GetBool(PlayerFile, "Capacete") == true)
    {
        if(IsPlayerAttachedObjectSlotUsed(playerid, 10))
        {
            RemovePlayerAttachedObject(playerid, 10);
            SendClientMessage(playerid, 0xFF8000AA, "[Ação]:{FFFFFF} Você retirou o capacete");
        }
        else
        {
            SetPlayerAttachedObject(playerid, 10, 18977, 2, DOF2_GetFloat(PlayerFile, "XC"), DOF2_GetFloat(PlayerFile, "YC"), DOF2_GetFloat(PlayerFile, "ZC"), DOF2_GetFloat(PlayerFile, "RXC"), DOF2_GetFloat(PlayerFile, "RYC"), DOF2_GetFloat(PlayerFile, "RZC"), DOF2_GetFloat(PlayerFile, "SXC"), DOF2_GetFloat(PlayerFile, "SYC"), DOF2_GetFloat(PlayerFile, "SZC"));
            SendClientMessage(playerid, 0xFF8000AA, "[Ação]:{FFFFFF} Você colocou o capacete");
        }
    }
    else
    {
        SendClientMessage(playerid, 0xFF0000AA, "[ERRO]:{FFFFFF} Você não tem um capacete");
    }
    return 1;
}

ajuda org

$
0
0
it save (null) on ini file how do to save "Ninguem" ?
PHP Code:

SalvarOrgs()
{
    new 
x;
    new 
filestr[15];    
    while(
sizeof(OrgInfo))//Para dar um Loop pelas orgs.
    
{
        
format(filestr30"Info Org%d.ini"x); //Para identificar a org, e abrir o arquivo dela.
        
if(!DOF2_FileExists(filestr)) DOF2_CreateFile(filestr) ; 
        
DOF2_SetString filestr"Lider" OrgInfo ] [ Lider ] ) ; 
        
DOF2_SetString filestr"Membro1" OrgInfo ] [ Membro1 ] ) ; 
        
DOF2_SetString filestr"Membro2" OrgInfo ] [ Membro2 ] ) ; 
        
DOF2_SetString filestr"Membro3" OrgInfo ][ Membro3 ] ) ; 
        
DOF2_SetString filestr"Membro4" OrgInfo ] [ Membro4 ] ) ; 
        
DOF2_SetString filestr"Membro5" OrgInfo ] [ Membro5 ] ) ; 
        
DOF2_SetString filestr"Membro6" OrgInfo ] [ Membro6 ] ) ; 
        
DOF2_SetString filestr"Membro7" OrgInfo] [ Membro7 ] ) ; 
        
DOF2_SetString filestr"Membro8" OrgInfo ] [ Membro8 ] ) ; 
        
DOF2_SetString filestr"Membro9" OrgInfo ] [ Membro9 ] ) ; 
        
DOF2_SetString filestr"Membro10" OrgInfo ] [ Membro10 ] ) ; 
        
DOF2_SetInt (filestr"Vaga" OrgInfo ] [ Vaga ] ) ; 
        
DOF2_SetInt filestr"Cofre" OrgInfo ] [ Cofre ] ) ; 
        
DOF2_SaveFile();
        
++ ; 
    } 
    return 



[Ajuda] Ajuda Org

$
0
0
esta salvando (null) no arquivo .ini como faço pra salvar "Ninguem" ?
PHP Code:

SalvarOrgs()
{
    new 
x;
    new 
filestr[15];    
    while(
sizeof(OrgInfo))//Para dar um Loop pelas orgs.
    
{
        
format(filestr30"Info Org%d.ini"x); //Para identificar a org, e abrir o arquivo dela.
        
if(!DOF2_FileExists(filestr)) DOF2_CreateFile(filestr) ; 
        
DOF2_SetString filestr"Lider" OrgInfo ] [ Lider ] ) ; 
        
DOF2_SetString filestr"Membro1" OrgInfo ] [ Membro1 ] ) ; 
        
DOF2_SetString filestr"Membro2" OrgInfo ] [ Membro2 ] ) ; 
        
DOF2_SetString filestr"Membro3" OrgInfo ][ Membro3 ] ) ; 
        
DOF2_SetString filestr"Membro4" OrgInfo ] [ Membro4 ] ) ; 
        
DOF2_SetString filestr"Membro5" OrgInfo ] [ Membro5 ] ) ; 
        
DOF2_SetString filestr"Membro6" OrgInfo ] [ Membro6 ] ) ; 
        
DOF2_SetString filestr"Membro7" OrgInfo] [ Membro7 ] ) ; 
        
DOF2_SetString filestr"Membro8" OrgInfo ] [ Membro8 ] ) ; 
        
DOF2_SetString filestr"Membro9" OrgInfo ] [ Membro9 ] ) ; 
        
DOF2_SetString filestr"Membro10" OrgInfo ] [ Membro10 ] ) ; 
        
DOF2_SetInt (filestr"Vaga" OrgInfo ] [ Vaga ] ) ; 
        
DOF2_SetInt filestr"Cofre" OrgInfo ] [ Cofre ] ) ; 
        
DOF2_SaveFile();
        
++ ; 
    } 
    return 



[Ajuda] Nao pega id do lider

$
0
0
nao ta pegando o id do lider caso ele esteja online fiz um dbug e esta retornando 0 sempre

PHP Code:

CMD:limparlider(playeridparams[])
{
    new 
orgid;
    if(
Player[playerid][pAdminlevel] < Sub_Dono
        return 
SCM(playeridCINZA"[VS:RP] Voce nao tem permissao");
    if(
sscanf(params"i"orgid)) 
        return 
SCM(playeridCINZA"[VS:RP] Uso: /limparlider [ID-ORG]");
    if( 
IsPlayerOnline(OrgInfo[orgid][Lider]) )
    {
        
printf("Lider: %s",OrgInfo[orgid][Lider]);
        new 
id GetPlayerIdFromName(OrgInfo[orgid][Lider]); // nao esta pegando o id aqui
        
printf("id: %d",id);
        
Player[id][Org] = 0;
        
Player[id][Cargo] = 0;
        
SendClientMessage(id, -1"O admin removeu seu lider");
        
SendClientMessage(playerid, -1"Voce limpou lider!");
    }
    else
    {
        new 
file[40];
        
format(filesizeof(file),"Contas/%s.ini"PegarNome(OrgInfo[orgid][Lider]));
        if(!
DOF2_FileExists(file))
        {
            
DOF2_SetInt(file"Org"0);
            
DOF2_SetInt(file"Cargo"0);
            
DOF2_SaveFile();
        }
    }
    
format(OrgInfo[orgid][Lider], MAX_PLAYER_NAME"Ninguem");
    
SalvarOrgs();
    return 
true;


PHP Code:

Function GetPlayerIdFromName(playername[])
{
      for(new 
0<= MAX_PLAYERSi++)
      {
        if(
IsPlayerConnected(i))
        {
              new 
playername2[MAX_PLAYER_NAME];
              
GetPlayerName(iplayername2sizeof(playername2));
              if(
strcmp(playername2playernametruestrlen(playername)) == 0)
              {
                return 
i;
              }
          }
      }
      return 
INVALID_PLAYER_ID;
}
Function 
IsPlayerOnline(name[])
{
    new 
PlayerName2[MAX_PLAYER_NAME];
    for(new 
i=0i<MAX_PLAYERSi++)
    {
        if(
IsPlayerConnected(i))
        {
            
GetPlayerName(iPlayerName2sizeof(PlayerName2));
            if(
strcmp(name,PlayerName2,false)==0)
            {
                return 
true;
            }
        }
    }
    return 
0;



[Ajuda] Gangzone com açao

$
0
0
Ola andei pesquisando como bloquear comandos e executar açao dentro da Gz minha intençao era remover as armas dos player e bloquear certos comandos ja vi isso em alguns serves mas nao consegui achar nenhum tutorial :(

PHP Code:

new DayZ

public OnGameModeInit()
PHP Code:

DayZ GangZoneCreate(-2931.147,-362.0141,-1506.446,1377.989); 


public OnPlayerSpawn(playerid)
PHP Code:

GangZoneShowForPlayer(playeridDayZ0x000000FF); 

Message

$
0
0
How can I use " " " symbol on SendClientMessage ?

Help mysql solution

$
0
0
Hello, can you help me with these errors please

pawn Code:
[21:37:50] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='42',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`=' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
[21:38:53] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='43',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`=' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
[21:39:55] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='3011681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='44',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='3011681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
[21:40:58] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='45',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`=' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
[21:42:00] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='46',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`=' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
[21:43:03] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='47',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`=' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
[21:44:05] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='48',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`=' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
[21:45:08] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='49',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`=' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
[21:46:10] [ERROR] error #1064 while executing query "UPDATE usuarios SET IP`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`='0',`Estacionado1`='0',`Estacionado2`='0',`Estacionado3`='0',`Estacionado4`='0',`EnEstacionamiento`='0',`Moneda`='300',`EnCasa`='0',`EnRopero`='0',`EnGarage`='50',`TiempoPD`='0' WHERE `Username`='Cake'": You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '`='186.92.11.186',Banco`='11681',`CasaID`='0',`CasaID2`='0',`EstacionamientoID`=' at line 1 (C:\Users\Feras\Desktop\GM.pwn:15018 -> C:\Users\Feras\Desktop\GM.pwn:20133)
Line:
pawn Code:
mysql_format(Conecction, Query, sizeof(Query), "UPDATE usuarios SET IP`='%s',Banco`='%d',`CasaID`='%d',`CasaID2`='%d',`EstacionamientoID`='%d',`Estacionado1`='%d',`Estacionado2`='%d',`Estacionado3`='%d',`Estacionado4`='%d',`EnEstacionamiento`='%d',`Moneda`='%d',`EnCasa`='%d',`EnRopero`='%d',`EnGarage`='%d',`TiempoPD`='%d' WHERE `Username`='%s'",PlayerInfo[playerid][IP],PlayerInfo[playerid][pBanco],PlayerInfo[playerid][CasaID],PlayerInfo[playerid][CasaID2],PlayerInfo[playerid][EstacionamientoID],PlayerInfo[playerid][vEstacionado1],PlayerInfo[playerid][vEstacionado2],PlayerInfo[playerid][vEstacionado3],PlayerInfo[playerid][vEstacionado4],PlayerInfo[playerid][pEnEstacionamiento],PlayerInfo[playerid][Moneda],PlayerInfo[playerid][EnCasa],PlayerInfo[playerid][EnRopero],PlayerInfo[playerid][TiempoPD],PlayerInfo[playerid][EnGarage],PlayerInfo[playerid][NombreTemporal]);
        mysql_tquery(Conecction, Query);

how to detect the pos where bomb drops?

$
0
0
how to detect the pos where bomb drops?

i want to increment tear gas bomb to create a smoke grenade like on cs go with this object:
https://dev.prineside.com/en/gtasa_s...earch/?q=18715


for now i have this script, but it is working pretty bad, not get even close the position:

top of GM
pawn Code:
// granade pos 1
new TimerKFPressed[MAX_PLAYERS];

public OnPlayerDisconnect(playerid, reason) {
pawn Code:
// granade pos 2
    if(TimerKFPressed[playerid]) StopPressing(playerid);

public OnPlayerDeathEx(playerid) {
pawn Code:
// granade pos 3
    if(TimerKFPressed[playerid]) StopPressing(playerid);

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
pawn Code:
// granade pos 4
        else if(newkeys & KEY_FIRE && IsAGrenade(GetPlayerWeapon(playerid)) )
        {
            if(TimerKFPressed[playerid]) StopPressing(playerid); //If it's already started we stop it here
            TimerKFPressed[playerid] = SetTimerEx("PressingKey",1000,true,"i",playerid); //And start it again
        }

public OnPlayerUpdate(playerid)
pawn Code:
// granade pos 5
        if(TimerKFPressed[playerid] && GetPVarInt(playerid,"PressingSecs") >= 5) StopPressing(playerid);

pawn Code:
// granade pos 6
forward PressingKey(playerid);
public PressingKey(playerid)
{
    SetPVarInt(playerid,"PressingSecs",GetPVarInt(playerid,"PressingSecs")+1);
    return 1;
}

pawn Code:
// granade pos 7
stock StopPressing(playerid)
{
    KillTimer(TimerKFPressed[playerid]);
    //new str[35];
    //format(str,sizeof(str),"Key pressed for %d seconds",GetPVarInt(playerid,"PressingSecs"));
    new seconds = GetPVarInt(playerid,"PressingSecs");
    new Float:Px, Float:Py, Float:Pz;
    GetPlayerPos(playerid, Px, Py, Pz);
    GetXYInFrontOfPlayer(playerid, Px, Py, seconds*5);
        // smoke grenade FUNCTION
        SetTimerEx("PlantarSmoke2", 500, 0, "ifffi", playerid, Px, Py, Pz, 2);
    //SendClientMessage(playerid,-1,str);
    SetPVarInt(playerid,"PressingSecs",0); //Here we reset the seconds so when he will press it again we can count the new seconds
    TimerKFPressed[playerid] = 0; //We reset this so it could pass the check if(TimerPressed[playerid])
        // remomve grenades
        SetTimerEx("removerGranada", 500, 0, "iii", playerid, SWthrow[playerid], SWthrowTYPE[playerid]);
}


is anyone could help me to get the position or get my script better?

Lost Server Help

$
0
0
The last time i played SAMP was in 2016 and then i don't remember why but i left SAMP, And there was a server in the server i left behind alot of cash cars and a nice big house in the Beverly hills, It was in the hills, Now i am joining SAMP again i can't find that server i can't remember the name and i don't have any backups my windows got corrupted alot and i had to install new windows so i lost all backup, i do remember it was like normal san andreas you had to buy cars and bikes and houses, There were events that happened in the server, You could modify cars aswell and you had to pay in game money for that aswell, And the most important thing i remember there was this red bridge it was foggy kind of... And at the side of the bridge there was this sand and on the sand there were these beach houses like ten of them and the stairs leaded to them from the bridge there were surprisingly a lot of pakistanis and indians and very nice friends i had, I was not responsable for things in that age if i was i should've backed up the name and everything can anyone please tell me servers that are like this i really want that stuff and those friends back.

Auto School enterier

Help with this please

$
0
0
Code:

Admini(playerid, typ)
{
        new vypis[(MAX_PLAYER_NAME+32)*30+16];
        new query[80];
        new caption[16];
        if (typ == 0)
        {
                mysql_format(handle, query, sizeof(query), "SELECT * FROM `ASystem` WHERE hodnost >=2 AND prihlaseny=1 ORDER BY hodnost DESC");
                format(caption, sizeof(caption), "Online admini");
        }
        else if (typ == 1)
        {
                mysql_format(handle, query, sizeof(query), "SELECT * FROM `ASystem` WHERE hodnost >=2 ORDER BY hodnost DESC");
                format(caption, sizeof(caption), "Všetci admini");
        }
        mysql_query(handle, query);
        format(vypis, 16, "Nick\tHodnost\n");
        new n[MAX_PLAYER_NAME];
        new rowCount;
        cache_get_row_count(rowCount);
        for (new i = 0; i < rowCount; i++)
        {
            cache_get_value(i, "nick", n, handle);
                format(vypis, sizeof(vypis), "%s%s\t%s\n", vypis, n, hodnosti[cache_get_field_content_int(i, "hodnost", handle)]);
        }
        ShowPlayerDialog(playerid, DIALOG_VYPIS, DIALOG_STYLE_TABLIST_HEADERS, caption, vypis, "Ok", "");
}

Code:

ERROR : error 017: undefined symbol "cache_get_value"
LINE :  cache_get_value(i, "nick", n, handle);

I have update to new mysql...

[Ajuda] Origem não exibe como string

$
0
0


Quando eu digito o comando, ele exibe a origem do personagem como nula, não sei
simplesmente, não exibe :confused:

Comando:
PHP Code:

CMD:origem(playeridparams[])
{
    
SendClientMessageEx(playeridCOLOR_WHITE"Sua origem: %s"PlayerData[playerid][pOrigin]);
    return 
1;


Enum
PHP Code:

enum pData {
    
pID,
    
pOrigin[32],

    
bool:pLoggedIn
}
new 
PlayerData[MAX_PLAYERS][pData]; 

Carrega as variáveis
PHP Code:

forward SQL_LoadAccount(playerid);
public 
SQL_LoadAccount(playerid)
{
    
PlayerData[playerid][pLoggedIn] = true;

    
cache_get_value_int(0"ID"PlayerData[playerid][pID]);

    
PlayerData[playerid][pOrigin] = cache_get_value_name(0"Origin"PlayerData[playerid][pOrigin]);

    return 
1;


[Ajuda] Logs

$
0
0
Tipo tenho um sistema de log na minha gm, ai ele salva todos logs em um .ini apenas, queria saber como eu salvo cada log por conta, Tipo log de Chat ai vai salvar todos chat de somente um usuario no proprio .ini dele!

Checkout.

$
0
0
Have any way write line like this without get error?
Code:

if(PlayerInfo[playerid][Level] < 5 || IsPlayerAdmin(playerid)) return SendClientMessage(playerid, Dred, NOTALLOWED);
Or i should remove one ) from the IsPlayerAdmin(playerid))

[Ajuda] Opções em cima do slot

$
0
0
Bom, fiz um sistema de inventário e eu queria deixar as opções como usar e dropar em cima do slot, pensei em varias maneira mas não consigo deixar correto, já utilizei: mudar as tx de pos (A box buga) e alinhamento (Não fica corretamente no slot) então vim aqui pedir uma ajuda pra vocês pois tenho quase certeza que deve ter uma função pra isso e eu não a conheço...

+rep pra quem dar essa força!

AdrianO Vehicle's (Gta SA)

Viewing all 18226 articles
Browse latest View live


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