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

[Ajuda] error 017: undefined symbol CHATO

$
0
0
Galera me ajudem por favor! Já estou a dias querendo saber oque estou fazendo de errado, já vi alguns tutoriais e nada!

Eu fiz um sistema de linguagens, porém quando fui utilizar de uma forma mais optimizada da o seguinte erro abaixo:

PHP Code:

C:\Users\Felipe\Desktop\DayZ\gamemodes\new.pwn(113) : error 017undefined symbol "SendClientServerEx"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase 

Meu code:

PHP Code:

#define SendClientServerEx(%0,%1) SendClientMessageEx(%0, -1, "SERVER: "%1)

stock SendClientMessageEx(playeridcolor, const str[], va_args < >)
{
    new 
Buffer[148];
    
va_format(Buffersizeof Bufferstrva_start >);
    return 
SendClientMessage(playeridcolorBuffer);


PHP Code:

/* SendClientServerEx seta a TAG (SERVER:) Antes do Texto */

CMD:test(playeridparams[])
{
    
SendClientServerEx(playeridTranslate(gInfo[playerid][gLanguage], "You're getting thirsty.""Você está ficando com sede.")); /* error line - error 017: undefined symbol "SendClientServerEx" */

    
return 1;



error 033: array must be indexed (variable "LuxZone")

$
0
0
Code:

            new LuxZone[MAX_ZONE_NAME];
            GetPlayer2DZone(playerid, LuxZone, MAX_ZONE_NAME);

            if(LuxZone != 0){//error
            format(string_velo, sizeof (string_velo), " %s", LuxZone);
            PlayerTextDrawSetString(playerid, textPlayerVelocimetro[2][playerid], string_velo);
            }else{
            format(string_velo, sizeof (string_velo), "N/A", LuxZone);
            PlayerTextDrawSetString(playerid, textPlayerVelocimetro[2][playerid], string_velo);
            }

If LuxZone doesn't get any location do i need to detect if is it different from '0' or from anything else as i'm getting this error?

[Ajuda] PICKUPS EXPLODINDO

$
0
0
Atualmente estou criando um mapinha, antes de começar de fato Icones e Pickups , mas alguns pickups estão explodindo quando chego perto, estou utilizando essas linhas pra adicionar pickups:

CreatePickup(1314,0, 1243.1696,-1699.2930,14.8672); //spawncivil
CreatePickup(1318,1, 1480.9645,-1771.7689,18.7958); //prefeitura
CreatePickup(1318,2, 1368.0939,-1279.7792,13.5469); //Loja de armas 1
CreatePickup(1318,3, 1070.2703,-1873.6298,13.5469); //Loja de armas 2
CreatePickup(1313,4, 1615.1582,-1494.5442,14.2341); //Mercado
CreatePickup(1247,5, 1554.7935,-1675.5979,16.1953); //Policia pref
CreatePickup(1318,6, 1412.3699,-1700.2731,13.5395); //Loja qualquer

Há varias delas, não copiei todas, pois é apenas um exemplo, se alguém sabe como resolver, me ajuda PLzZz
OBS: Sou noob, comecei com edição Pawn a menos de uma semana, vendo videos no youtube!!

[Ajuda] Host não inicia com a gamemode

$
0
0
local-host funciona normalmente, quando upo a gamemode pro host, ela simplesmente não acha a GM na pasta. alguém pode me ajudar? Já rodei tudo o que podia para resolver, e nada ainda

Já atualizei os plugins, já re-compilei tudo também

Quote:

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

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

[06:38:55] password = "" (string)
[06:38:55] filterscripts = "" (string)
[06:38:55]
[06:38:55] Server Plugins
[06:38:55] --------------
[06:38:55] Loading plugin: sscanf.so
[06:38:55]

[06:38:55] ===============================

[06:38:55] sscanf plugin loaded.

[06:38:55] (c) 2009 Alex "******" Cole

[06:38:55] ===============================

[06:38:55] Loaded.
[06:38:55] Loading plugin: streamer.so
[06:38:55]

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

[06:38:55] Loaded.
[06:38:55] Loading plugin: MapAndreas.so
[06:38:55] Loaded.
[06:38:55] Loaded 3 plugins.

[06:38:56]
[06:38:56] Ban list
[06:38:56] --------
[06:38:56] Loaded: samp.ban
[06:38:56]
[06:38:56]
[06:38:56] Filterscripts
[06:38:56] ---------------
[06:38:56] Loaded 0 filterscripts.

[06:38:56] Script[gamemodes/BPS.amx]: Run time error 19: "File or function is not found"
[06:38:56] Number of vehicle models: 0

1AM

SetPlayerColor returns black color

$
0
0
Can someone explain me why this function doesn't set correct color based on LEO level? It's always black despite the level.

pawn Code:
stock SetLeoColor(playerid)
{
    switch(ReturnLeoLevel(playerid))
    {        
        case 1: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_1);
        case 2: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_2);
        case 3: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_3);
        case 4: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_4);
        case 5: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_5);
        case 6: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_6);
        case 7: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_7);
        case 8: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_8);
        case 9: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_9);
        case 10: SetPlayerColor(playerid, COLOR_LIGHT_BLUE_10);
    }
}

pawn Code:
#define COLOR_LIGHT_BLUE_1      0x050F1AFF
#define COLOR_LIGHT_BLUE_2      0x0A1F33FF
#define COLOR_LIGHT_BLUE_3      0x0F2E4CFF
#define COLOR_LIGHT_BLUE_4      0x143D66FF
#define COLOR_LIGHT_BLUE_5      0x1A4C80FF
#define COLOR_LIGHT_BLUE_6      0x1F5C99FF
#define COLOR_LIGHT_BLUE_7      0x246BB2FF
#define COLOR_LIGHT_BLUE_8      0x297ACCFF
#define COLOR_LIGHT_BLUE_9      0x2E8AE6FF
#define COLOR_LIGHT_BLUE_10     0x3399FFFF

VPS Not Working

$
0
0
Hello
I Just Run my Server.exe on VPS
and i Added MY VPS IP With 7777 Port
I Have Windows Server 2019

It Says Retrieving Info

Anyone Could Help?

[Pedido] vender veiculo para player

$
0
0
Queria q nesse fs de conce tivesse uma opção de dar o veiculo para player
Agradeço a quem puder ajudar :p







// Créditos: Jonathan Feitosa
// curta: *******/GoHumorGTA
// 1.2 - 25/03/2015

#include <a_samp>
#include <dof2>
#include <zcmd>

#include "../scriptfiles/JFSConcessionaria/DefinicoesJFS.pwn"

public OnFilterScriptInit()
{
CreatePickup(1239, 23, 2132.0010,-1149.9999,24.2075);
Create3DTextLabel("Sistema de Concessionária\nAperte 'F'", -1, 2132.0010,-1149.9999,24.207, 40.0, 0);
format(Celulas, sizeof(Celulas), "/JFSConcessionaria");
if(!DOF2::FileExists(Celulas))
{
for(new x=0; x < 20; ++x) {
print("[JFS Concessionária] - NÃO EXISTE A PASTA JFSConcessionaria NO SCRIPTFILES ! CRIE AGORA !");
}
SendRconCommand("exit");
}
format(Celulas, sizeof(Celulas), "/JFSConcessionaria/Veiculos");
if(!DOF2::FileExists(Celulas))
{
for(new x=0; x < 20; ++x) {
print("[JFS Concessionária] - NÃO EXISTE A PASTA Veiculos EM JFSConcessionaria NOS SCRIPTFILES ! CRIE AGORA !");
}
SendRconCommand("exit");
}
print("[JFS Concessionária] - Carregado com Sucesso !");
return true;
}

public OnFilterScriptExit()
{
DOF2::Exit();
return true;
}

public OnPlayerConnect(playerid)
{
CarregarCarro(playerid);
gHeaderTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gBackgroundTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gCurrentPageTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gNextButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;
gPrevButtonTextDrawId[playerid] = PlayerText:INVALID_TEXT_DRAW;

for(new x=0; x < CARROSPAGINA; x++) {
gSelectionItems[playerid][x] = PlayerText:INVALID_TEXT_DRAW;
}

gItemAt[playerid] = 0;

return true;
}

public OnPlayerDisconnect(playerid)
{
JFSDestroyVehicle(playerid);
return true;
}

public OnPlayerClickTextDraw(playerid, Text:clickedid)
{
if(GetPVarInt(playerid, "JFSTextAtivado") == 0) return false;

if(clickedid == Text:INVALID_TEXT_DRAW) {
DestroySelectionMenu(playerid);
SetPVarInt(playerid, "JFSTextAtivado", 0);
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
return true;
}
return false;
}

public OnPlayerClickPlayerTextDraw(playerid, PlayerText:playertextid)
{
if(GetPVarInt(playerid, "JFSTextAtivado") == 0) return false;
new curpage = GetPVarInt(playerid, "JFSPagina");

if(playertextid == gNextButtonTextDrawId[playerid])
{
if(curpage < (GETNumeroPaginas() - 1))
{
SetPVarInt(playerid, "JFSPagina", curpage + 1);
ShowPlayerModelPreviews(playerid);
UpdatePageTextDraw(playerid);
PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
} else {
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
return true;
}
if(playertextid == gPrevButtonTextDrawId[playerid])
{
if(curpage > 0)
{
SetPVarInt(playerid, "JFSPagina", curpage - 1);
ShowPlayerModelPreviews(playerid);
UpdatePageTextDraw(playerid);
PlayerPlaySound(playerid, 1084, 0.0, 0.0, 0.0);
} else {
PlayerPlaySound(playerid, 1085, 0.0, 0.0, 0.0);
}
return true;
}
new x=0;
while(x != CARROSPAGINA)
{
if(GetPlayerMoney(playerid) < PrecoCarros) return SendClientMessage(playerid, -1, "Você não tem dinheiro suficiente ! R$20.000");
if(playertextid == gSelectionItems[playerid][x])
{
JFSComprouVeiculo(playerid, x);
PlayerPlaySound(playerid, 1083, 0.0, 0.0, 0.0);
DestroySelectionMenu(playerid);
CancelSelectTextDraw(playerid);
SetPVarInt(playerid, "JFSTextAtivado", 0);
return true;
}
x++;
}
return false;
}

public OnPlayerCommandText(playerid, cmdtext[]) return false;

public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if (PRESSED(KEY_SECONDARY_ATTACK))
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, 2132.0010, -1149.9999, 24.2075))
{
if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, -1, "Você Não comprar veiculo dentro de um.");
if((CarroJFS[playerid] == 1)) return SendClientMessage(playerid, -1, "Você Já Tem um Veiculo.");
#if(AdicionarVIP == 1)
if(VariavelVIP < 1) return SendClientMessage(playerid, -1, "Você Não é VIP.");
#endif
DestroySelectionMenu(playerid);
SetPVarInt(playerid, "JFSTextAtivado", 1);
CreateSelectionMenu(playerid);
SelectTextDraw(playerid, 0xACCBF1FF);
}
}
return true;
}


CMD:excluirveiculo(playerid, params[])
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xDEEE20FF, "Apenas Para Administrador Logado na RCON!");
format(Celulas, sizeof(Celulas), JFSCON, PlayerName(playerid));
if(!DOF2::FileExists(Celulas)) return SendClientMessage(playerid, -1, "Esse Úsuario não tem veiculo!");
format(Celulas, sizeof(Celulas), "Arquivo Veiculo_%s.ini Excluido com Sucesso dos ScriptFiles !", PlayerName(playerid));
SendClientMessage(playerid, -1, Celulas);
DOF2::RemoveFile(Celulas);
DOF2::SaveFile();
if(IsPlayerConnected(strlen(PlayerName(playerid))) )
{
JFSID[strlen(params)] = 0;
DestroyVehicle(JFSID[strlen(PlayerName(playerid))]);
}
return true;
}

CMD:veiculomenu(playerid, params[])
{
format(Celulas, sizeof(Celulas), JFSCON, PlayerName(playerid));
if (!DOF2::FileExists(Celulas)) return SendClientMessage ( playerid , -1 , "Você não tem um veiculo!" ) ;
if (!IsPlayerInVehicle(playerid, JFSID[playerid])) return SendClientMessage (playerid , -1 , "Você não está em seu veiculo." ) ;
ShowPlayerDialog(playerid, 7337, DIALOG_STYLE_LIST, "JFS Concessionária - Menu", "Estacionar Neste Lugar\nCor do Veiculo\nVender Veiculo\nPlaca Veiculo\nGrana Veiculo", "Selecionar", "Cancelar");
return true;
}

CMD:grana(playerid, params[])
{
GivePlayerMoney(playerid, 500000);
return true;
}

CMD:irla(playerid, params[])
{
// if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xDEEE20FF, "Apenas Para Administrador Logado na RCON!");
SetPlayerPos(playerid, 2132.0010,-1149.9999,24.2075);
return true;
}

CMD:localizarveiculo(playerid, params[])
{
format(Celulas, sizeof(Celulas), JFSCON, PlayerName(playerid));
if (!DOF2::FileExists(Celulas)) return SendClientMessage ( playerid , -1 , "Você não tem um veiculo!" ) ;
JFSCheck[playerid] = 1;
static Float:CordX, Float:CordY, Float:CordZ;
GetVehiclePos(JFSID[playerid], CordX, CordY, CordZ);
SetPlayerCheckpoint (playerid , CordX, CordY, CordZ, 10.0);
SendClientMessage(playerid , -1, "Seu Veículo Está Marcado no Mapa !");
return true;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if(dialogid == 7337)
{
if(response)
{
if(listitem == 0)
{
new VeiculoID = JFSID[playerid];
static Float:CordX, Float:CordY, Float:CordZ, Float:Angulo;
GetVehiclePos(VeiculoID, CordX, CordY, CordZ);
GetVehicleZAngle(VeiculoID, Angulo);
JFSCarros[playerid][JFSCorX] = CordX;
JFSCarros[playerid][JFSCorY] = CordY;
JFSCarros[playerid][JFSCorZ] = CordZ;
JFSCarros[playerid][JFSAngulo] = Angulo;
DestroyVehicle(VeiculoID);
JFSID[playerid] = CreateVehicle(JFSCarros[playerid][JFSModelo], JFSCarros[playerid][JFSCorX], JFSCarros[playerid][JFSCorY], JFSCarros[playerid][JFSCorZ], JFSCarros[playerid][JFSAngulo], JFSCarros[playerid][JFSCor1] , JFSCarros[playerid][JFSCor2], 0);
PutPlayerInVehicle(playerid, JFSID[playerid], 0);
SendClientMessage(playerid, -1, "Seu Veiculo vai da Spawn Aqui Agora!");
SalvarArquivos(playerid);
}
if(listitem == 1)
{
ShowPlayerDialog(playerid, 3773, DIALOG_STYLE_INPUT, "JFS Concessionária v1.0 - Cor", "DIGITE O ID DA COR 1 DE SEU VEICULO\n\n\nPS: As Cores Foram Modificadas na versão 0.3x.", "Comprar", "Cancelar");
}
if(listitem == 2)
{
format(Celulas, sizeof(Celulas), "[JFS Concessionária] - Seu Veiculo Será Vendido Por %d.\n\nCaso Queria Vender seu Veículo, Confirme Abaixo.\n\n", GranaVenderCarro);
ShowPlayerDialog(playerid, 4217, DIALOG_STYLE_MSGBOX, "JFS Concessionária v1.0 - Vender Veiculo", Celulas, "Confirmar", "Cancelar");
}
if(listitem == 3)
{
ShowPlayerDialog(playerid, 2461, DIALOG_STYLE_INPUT, "JFS Concessionária v1.0 - Placa", "DIGITE A PLACA DO SEU VEICULO\n\n", "Trocar", "Cancelar");
}
if(listitem == 4)
{
GivePlayerMoney(playerid, JFSCarros[playerid][JFSCofre]);
format(Celulas, sizeof(Celulas), "[JFS Concessionária] - Você retirou %d de seu veiculo.", JFSCarros[playerid][JFSCofre]);
SendClientMessage(playerid, -1, Celulas);
JFSCarros[playerid][JFSCofre] = 0;
SalvarArquivos(playerid);
}
}
return true;
}
if(dialogid == 4217)
{
if(response)
{
format(Celulas, sizeof(Celulas), JFSCON, PlayerName(playerid));
DOF2::RemoveFile(Celulas);
DOF2::SaveFile();
DestroyVehicle(JFSID[playerid]);
CarroJFS[playerid] = 0;
RemovePlayerFromVehicle(playerid);
format(Celulas, sizeof(Celulas), "[JFS Concessionária] - Você Vendeu seu veiculo e ganhou %d.", GranaVenderCarro);
SendClientMessage(playerid, -1, Celulas);
GivePlayerMoney(playerid, GranaVenderCarro);
}
return true;
}
if(dialogid == 2461)
{
if(response)
{
if(strlen(inputtext) > 1 && strlen(inputtext) < 9)
{
format(Celulas,sizeof(Celulas),"%s", inputtext);
static Float:CordX, Float:CordY, Float:CordZ, Float:Angulo;
new VeiculoID = JFSID[playerid];
SetVehicleNumberPlate(VeiculoID, Celulas);
GetVehiclePos(VeiculoID, CordX, CordY, CordZ);
GetVehicleZAngle(VeiculoID, Angulo);
SetVehicleToRespawn(VeiculoID);
SetVehiclePos(VeiculoID, CordX, CordY, CordZ);
SetVehicleZAngle(VeiculoID, Angulo);
PutPlayerInVehicle(playerid, VeiculoID, 0);
format(JFSCarros[playerid][JFSPlaca] , 9,"%s", inputtext);
SalvarArquivos(playerid);
}
else SendClientMessage(playerid, -1, "Apenas Caractéristicas de 2 a 8 !");
}
return true;
}
if(dialogid == 3773)
{
if(response)
{
new VeiculoID = JFSID[playerid];
if(!strval(inputtext)) return SendClientMessage(playerid, -1, "Apenas Numeros!"), true;
if(strval(inputtext) < 0 || strval(inputtext) > 255) return SendClientMessage(playerid, -1, "Existes Cores Apenas Entre 0 á 255."), true;
JFSCarros[playerid][JFSCor1] = strval(inputtext);
ChangeVehicleColor(VeiculoID, JFSCarros[playerid][JFSCor1], -1);
ShowPlayerDialog(playerid, 7733, DIALOG_STYLE_INPUT, "JFS Concessionária v1.0 - Cor", "DIGITE O ID DA COR 2 DE SEU VEICULO\n\n\nPS: As Cores Foram Modificadas na versão 0.3x.", "Comprar", "Cancelar");
}
return true;
}
if(dialogid == 7733)
{
if(response)
{
new VeiculoID = JFSID[playerid];
if(!strval(inputtext)) return SendClientMessage(playerid, -1, "Apenas Numeros!"), ShowPlayerDialog(playerid, 7733, DIALOG_STYLE_INPUT, "JFS Concessionária v1.0 - Cor", "DIGITE O ID DA COR 2 DE SEU VEICULO\n\n\nPS: As Cores Foram Modificadas na versão 0.3x.", "Comprar", "Cancelar"), true;
if(strval(inputtext) < 0 || strval(inputtext) > 255) return SendClientMessage(playerid, -1, "Existes Cores Apenas Entre 0 á 255."), ShowPlayerDialog(playerid, 7733, DIALOG_STYLE_INPUT, "JFS Concessionária v1.0 - Cor", "DIGITE O ID DA COR 2 DE SEU VEICULO\n\n\nPS: As Cores Foram Modificadas na versão 0.3x.", "Comprar", "Cancelar"), true;
JFSCarros[playerid][JFSCor2] = strval(inputtext);
ChangeVehicleColor(VeiculoID, JFSCarros[playerid][JFSCor1], JFSCarros[playerid][JFSCor2]);
SendClientMessage(playerid, -1, "Cores Definidas com Sucesso!");
SalvarArquivos(playerid);
}
else ShowPlayerDialog(playerid, 7733, DIALOG_STYLE_INPUT, "JFS Concessionária v1.0 - Cor", "DIGITE O ID DA COR 2 DE SEU VEICULO\n\n\nPS: As Cores Foram Modificadas na versão 0.3x.", "Comprar", "Cancelar");
return true;
}
return true;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
for(new carro, JFS = sizeof(JFSCarros); carro != JFS; carro++)
{
if(JFSID[carro] == GetPlayerVehicleID(playerid) && strcmp(PlayerName(playerid), JFSCarros[carro][JFSDono], true))
{
format(Celulas, sizeof(Celulas), "[JFS Concessionária] - Você pagou para %s R$%d por entrar no seu veiculo.", JFSCarros[carro][JFSDono], GranaAoEntrar);
SendClientMessage(playerid, -1, Celulas);
GivePlayerMoney(playerid, -GranaAoEntrar);
JFSCarros[playerid][JFSCofre] += GranaAoEntrar;
SalvarArquivos(playerid);
}
if(JFSID[carro] == GetPlayerVehicleID(playerid) && !strcmp(PlayerName(playerid), JFSCarros[carro][JFSDono], true))
{
SendClientMessage(playerid, -1, "[JFS Concessionária] - Bem Vindo ao Seu Veiculo! Use: /veiculomenu");
}
}
}
return true;
}

public OnPlayerEnterCheckpoint (playerid)
{
if (JFSCheck[playerid] == 1 )
{
SendClientMessage (playerid , -1 , "[JFS Concessionária] - Aqui Está Seu Veículo!");
DisablePlayerCheckpoint (playerid);
return true;
}
return true;
}

Detect the correct trailer

$
0
0
Hello. So there is this specific delivery, which would be available only for trailer artict ID:435. So if you try to start work with other trailers, then it should give error. I will crreate deliveries for other trailers seperately.



Here is the code:

PHP Code:

stock T_LS(playerid)
{
    new 
vID GetPlayerVehicleID(playerid); 
    if(
GetVehicleModel(vID)== 403 || GetVehicleModel(vID)== 515 || GetVehicleModel(vID) == 514//Roadtrain, Linerunner and Petrol trucks
    
{
        if(
IsTrailerAttachedToVehicle(vID)== 435//I tried to add that trailer id for delivery here, but that wont help. I get "You need to attach the trailer!" message.
        
{
            
ShowPlayerDialog(playerid50DIALOG_STYLE_TABLIST_HEADERS"Product Selection""Product\tFrom\tTo\tPayment\n{ffffff}1. {FF9933}Frozen Fish {ffffff}\tSan Fierro Docks \tRussia, Moscow\t{FF9933}EUR 15,000.-""Select""Close");
        }
        else
//if the player doesnt have a trailer attached
        
{
            
SendClientMessage(playeridCOLOR_WHITE"You need to attach the trailer!");
        }
    }
    else
//if the player isnt in a truck
    
{
        
SendClientMessage(playeridCOLOR_WHITE"You must be in a truck with attached trailer in order to work!");//sends message in console
    
}
    return 
1;


Thanks in advance for the help!

Ammunation problem

$
0
0
Hello, ok so i'm using PreviewModelDialog by Gammix and i took and edited his weapons dialog code to allow players select weapon categories without creating everytime an extra code.

I did in this way:

pawn Code:
enum E_AMMUNATION_DATA
{
    WEAPON_CATEGORY,
    WEAPON_MODELID,
    WEAPON_NAME[35],
    WEAPON_PRICE,
    WEAPON_AMMO,
    WEAPON_ID
};

enum
{
    CATEGORY_MELEE,
    CATEGORY_PISTOLS
}

pawn Code:
new AmmuCategory[MAX_PLAYERS];

new const AmmuData[][E_AMMUNATION_DATA] =
{
    //Category - Model ID - Name - Price - Ammo - Weapon ID

    //Melee
    {CATEGORY_MELEE, 331, "Brass Knuckles", 200, 1, WEAPON_BRASSKNUCKLE},
    {CATEGORY_MELEE, 333, "Golf Club", 100, 1, WEAPON_GOLFCLUB},
    {CATEGORY_MELEE, 335, "Knife", 250, 1, WEAPON_KNIFE},

    //Pistols
    {CATEGORY_PISTOLS, 346, "9mm Pistol", 500, 1, WEAPON_COLT45},
    {CATEGORY_PISTOLS, 347, "Silenced Pistol", 500, 1, WEAPON_SILENCED},
    {CATEGORY_PISTOLS, 348, "Desert Eagle", 500, 1, WEAPON_DEAGLE}
}

When a player enters the Ammunation checkpoint, all categories are listed and available to be chosen:

pawn Code:
case DIALOG_AMMUNATION:
        {
            SPDEX(playerid, DIALOG_AMMUNATION, DIALOG_STYLE_LIST, "Ammunation",\
            "Melee\nPistols", "Select", "Cancel");
        }

OnDialogResponse:

pawn Code:
case DIALOG_AMMUNATION:
        {
            if(!response)
            {
                AmmuCategory[playerid] = -1;
                return 1;
            }

            switch(listitem)
            {
                case 0: ShowAmmuMenu(playerid, CATEGORY_MELEE);
                case 1: ShowAmmuMenu(playerid, CATEGORY_PISTOLS);
            }
        }

ShowAmmuMenu:

pawn Code:
stock ShowAmmuMenu(playerid, category)
{
    new subString[200];

    AmmuCategory[playerid] = category;

    static string[sizeof(AmmuData) * sizeof(subString)];

    if(string[0] == EOS)
    {
        for(new i; i < sizeof(AmmuData); i++) if(AmmuData[i][WEAPON_CATEGORY] == category)
        {
            format(subString, sizeof(subString), "%i(0.0, 0.0, -50.0, 1.5)\t%s~n~~g~~h~$%i\n", AmmuData[i][WEAPON_MODELID], AmmuData[i][WEAPON_NAME], AmmuData[i][WEAPON_PRICE]);
            strcat(string, subString);
        }
    }
    return ShowPlayerDialog(playerid, DIALOG_AMMUNATION_BUY, DIALOG_STYLE_PREVIEW_MODEL, "Ammunation", string, "Purchase", "Cancel");
}

And here comes the problem:

Despite which category the player choose, the only weapons that will be shown are the melee ones.

Even if i select the "Pistols" category, i see instead the melee weapons.

Sorry for long code but i hope someone can help me, thanks.

[GameMode] SWAT vs Terrorists - Open Sourced! [0.3.7][MySQL R41-2][YSI][ColAndreas]

$
0
0
History

This gamescript was developed from early 2016 till this day, many features were added and many were removed, till it reached a good taste that people liked, and that made it the SWAT vs Terrorists it is today. A team-deathmatch gamescript with a lot of interesting features coded in a beautiful way and tested for too long, till it reached a stable state that people enjoyed playing.

Dependencies

This game script depends on the following packages in order to work:

Some dependencies are included within the repository - some are not (i.e. SA-MP includes and YSI 4.x, you have to download those)

Compiling

I remember using the community compiler (I think it's available on GitHub, search for it). Some dependencies mentioned above might require other stuff in order to work, I'm sure you will figure that out as you compile the script.

Important Notes
  • You may not use the same name styling as we do for the hostname, or attempt to copy our server
  • You may not use this source code to exploit our server
  • You may not link your server with h2omultiplayer.com
  • You have to keep all the credits, but you can add your name to the credits!
  • I'm providing this script as-is and can tell that it is licensed under GNU GPL v3 at the moment

Credits
  • Me for coding this script from scratch
  • ****** for YSI which has the most useful includes I used actually
  • Include developers mentioned above in #Dependencies
  • Some mapping and code snippets were taken from the MW3 game script
  • Anyone whose work is used in this script is credited, thank you!
  • You for editing this script, but be nice and keep a credit for people you use their work :)

Pre-Installation Requirements

* A functional MySQL server with a user that actually has access to a database
* A discord bot token for the bot to work, more information can be found on the official plugin's GitHub Repository https://github.com/maddinat0r/samp-discord-connector

* SA-MP 0.3.7 (or later) Server Executable Files [https://www.sa-mp.com/download.php]
* A little knowledge in how to get things working
* A mail php script to handle HTTP requests in "players/auth/email.pwn" I commented it, but it's actually needed!

Installation
  • Import database .SQL files in "gamemodes/database" to your MySQL database
  • Edit "gamemodes/server/database.pwn" with your MySQL connection details
  • Edit "gamemodes/server/header.pwn" with your discord information (above dcc include)
  • Modify server information under OnGameModeInit [in gamemodes/server/init.pwn] and in the header files [in gamemodes/server/header.pwn] (i.e. for bot config, hostname and so on)
  • Recompile the gamemode script
  • Modify server.cfg with your discord bot token
  • Move the .exe files from the SA-MP Server package you downloaded to the server's directory
  • Launch samp-server.exe!
Other words...

I, H2O and known as Variable am proud to present this script to you all. It's been a pleasure working on this script, I learnt much as I developed it, and today I'm happy to share my knowledge with you. I know you may not use this script to create a server but you probably want to learn how other big servers like this one has been, was developed. I want you to use it wisely, learn how stuff were implemented and do better. I don't promise updating this script anymore, but I have seriously been working on this script from early 2016 and till this day, adding features and removing useless ones, following standard coding styles and modern techniques to provide this script finally in 2020. This script ran with over 90 players smoothly, never lagged or encountered troubles handling large player numbers for days, weeks and months. But today, the server isn't even as active as it used to be, and I would like people to learn how it was developed, and to make better than it. Thanks SA-MP for letting me get into programming and making me interesting in learning other programming languages to make my own server. I spent a long time in SA-MP, and it's time to pay-back this community for how helpful it was to me during my time on it.

Thank you SA-MP, ******, anyone who helped make this script or test it, and everyone who spent time in the community. Thanks for the donors and sponsors who kept the community running smoothly for all those years.

Thanks to anyone whose discussions helped me learn more stuff, and especially the management team.

Thank you all.
Peace and love, love and peace.
H2O MULTIPLAYER!
https://h2omultiplayer.com/

Update it!

Don't let it outdated, add your touch to the game and let other see your work on the main server, and you can simply add your name to the credits.

You can simply fork this repository, add as much modifications as you like but please follow the same style as the game is now, and same indentation (K&R).

Repository
https://github.com/h2o-variable/publ...-vs-terrorists

Aaand finally, don't forget to add the .cadb file for ColAndreas to work!

Fun facts...
  1. This script included an achievements system that was nice but wasn't really important so I decided to remove it, but it will be nice if you make one
  2. Most server messages (excluding admin messages that are sent to admins) are available in language files that are located in scriptfiles/YSI so you can have more than one language
  3. Important declarations and are available in the header files, including team names and so on
  4. Implementations are available in various models

[Ajuda] RemoveBuildingForPlayer

$
0
0
Se eu usar isto:
PHP Code:

RemoveBuildingForPlayer(playerid9852497.40632777.070311.53130.25); 

Tem alguma forma de desfazer? Procurei mas não achei.

PreviewModelDialog increasing amx size

$
0
0
Hello, i'm using this include by Gammix:

https://forum.sa-mp.com/showthread.php?t=570213

And i noticed a big increase of final amx size (more than 15%).

My amx file size increase from 4mb to more than 50. Compiling time from 4 seconds to 12. As anyone experienced this too?

Bar | Texturizado | By: Orlando Rivas

$
0
0
Very good community of Forum Samp.
I hope you are excellent today.

In this occasion I have been teaching you a textured mapping that I did specifically for my SAMP server

If you liked it, don't forget to give me +1 in reputation.

Thanks and goodbye!

Images/Video: https://youtu.be/psP4ee6IIXk

Mod Shop's Coordinates

$
0
0
Wondering if anyone could please give me the coordinates to all mod shops in gta sa for me id greatly appreciate it thank you.

[Map] Idlewood exterior/remove alhambra

[Ajuda] Criar uma placa sem movimento

$
0
0
Queria adicionar através do GM algumas placas de transito tipo as id's: 19992, 19991,19990 etc... que são placas de limites de velocidades do sa-mp, porem, estou utilizando as linhas:
AddStaticPickup(19992, 1, 1340.6144,-1726.7671,13.5494); //Placa 55 esquina da pref
CreatePickup(19992, 1, 1340.6144,-1726.7671,13.5494); //Placa 55 esquina da pref
porém em ambas as linhas que tento, a placa fica rodando como um pickup queria que ela ficasse parada para uma direção apenas

[Pedido] Sprite Cadeado

$
0
0
Alguém sabe que sprite é esse do cadeado?

Imagem: Cadeado Imgur

Não achei em lugar nenhum, também procurei no SpriteBrower. Tbm to achando que nem sprite é pq n tem em lugar nenhum.

help sv

$
0
0
Hi, Help because my server when they shoot everything is laguea?

samp-server.exe - system error file missing log-core2.dll

$
0
0
Well, i was going to run my server and at last it's say error to me.The program can't start because log-core2.dll is missing from your computer.So,now i tried to find it at ****** and i'm not found anything with this file called log-core2.dll. If someone found file name log-core2.dll please drop a comment below please.
Thanks you

here is photo of error message : https://prnt.sc/rekkra
Viewing all 18226 articles
Browse latest View live


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