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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,772
» Latest member: hiago.sucesso.hs
» Forum threads: 2,369
» Forum posts: 12,326

Full Statistics

Online Users
There are currently 360 online users.
» 1 Member(s) | 357 Guest(s)
Bing, Google, hiago.sucesso.hs

Latest Threads
Real-time pathfinder, opt...
Forum: Pawn Scripting
Last Post: hiago.sucesso.hs
8 hours ago
» Replies: 1
» Views: 154
Is there a WebSocket plug...
Forum: General Discussions
Last Post: hiago.sucesso.hs
8 hours ago
» Replies: 0
» Views: 12
What would you start?
Forum: Life
Last Post: HELLHOUND
2025-12-14, 10:32 PM
» Replies: 5
» Views: 10,301
After School Roleplay - G...
Forum: Advertisements
Last Post: cosminupgaming
2025-12-14, 02:06 PM
» Replies: 3
» Views: 410
PROJECT: LOS ANGELES — TH...
Forum: Advertisements
Last Post: cosminupgaming
2025-12-13, 07:16 PM
» Replies: 4
» Views: 764
LCSHosting.eu - Free SA-M...
Forum: Tech
Last Post: LCSLaces
2025-12-12, 04:57 PM
» Replies: 0
» Views: 67
Las Venturas Gang Wars - ...
Forum: Advertisements
Last Post: lvgwgta
2025-12-12, 03:29 PM
» Replies: 0
» Views: 50
Infamous Roleplay
Forum: Advertisements
Last Post: JakeFalcone
2025-12-11, 11:34 PM
» Replies: 0
» Views: 55
The server didn't respond...
Forum: Support
Last Post: HELLHOUND
2025-12-11, 01:17 PM
» Replies: 1
» Views: 197
Grand Gang War (GGW)
Forum: Advertisements
Last Post: piroballu
2025-12-09, 01:16 PM
» Replies: 1
» Views: 259

 
  Server economy ideas?
Posted by: Snow - 2021-04-16, 11:06 PM - Forum: General Discussions - Replies (2)

So I am running a freeroam server and I'm pretty much stuck at server economy. There are not much uses of money atm. Right now, money can be used for buying houses, adding objects in the house, attaching objects on the skin and buying weapons. Not to forget a little amount that gets deducted on death. I think its not much for a freeroam server but then again, its freeroam so limiting things such as vehicles to money will be bad for server aswell. So what are your suggestions?


  Sending message to all owner of key (from SQL)
Posted by: Axitz - 2021-04-16, 10:46 PM - Forum: Pawn Scripting - Replies (1)

Hi,



How do I make something like sending message to all key's holder from sql function?



example like :



PHP Code:
mysql_format(sqldatapQuerysizeof pQuery"SELECT doorkey FROM `bizkeys` WHERE bizid = %d;"bizid);

new 
Cache:result mysql_query(sqldatapQuery);



then?



sendclientmsg to all holder of "doorkey" from bizid = %d



or something.


  Getting the size of an array
Posted by: Torque - 2021-04-16, 02:37 PM - Forum: Pawn Scripting - Replies (3)

I have a multi-dimensional array, and I want to get the size of each line.

Code:
new BusRoutes[][] = {
? ? {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
? ? {0, 11, 12, 13, 14, 15, 16, 17, 18, 19, 10}
};


Code:
new const MaxStops[] = sizeof(BusRoutes[]);

Code:
format(sStops, sizeof(sStops), "Stops: 0/%d", MaxStops[vRoute]);

If vRoute = 0, it works fine, but if it equals 1, the function crashes and it doesn't continue running the rest of the function. Something is wrong with MaxStops[vRoute] if vRoute equals anything other than 0.

What am I doing wrong?


  HELP! how to edit a dynamic object attached to vehicle stucked position
Posted by: PutuSuhartawan - 2021-04-16, 12:42 AM - Forum: Pawn Scripting - Replies (5)

Code:
CMD:objekkendaraan(playerid, params[])

{



//SetPlayerArmour(playerid, Float:70.1);

//pakaiarmour[playerid] = 1; // kondisi sedang pakai armour

//SetPlayerAttachedObject(playerid, 3, 19515, 1 , 0.096999,0.058999,0.012999,4.199995,0.999981,8.800023,1.000000,1.221000,0.797000, 0xFFFFA500, 0xFFFFA500);

//EditAttachedObject(playerid, 3);







//contohdikendaraan = CreateDynamicObject(18649, 0,0,0,0,0,0);

//CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0)

//CreateDynamicObject(modelid, Float:x, Float:y, Float:z, Float:rx, Float:ry, Float:rz, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = STREAMER_OBJECT_SD, Float:drawdistance = STREAMER_OBJECT_DD, STREAMER_TAG_AREA areaid = STREAMER_TAG_AREA -1, priority = 0)

contohdikendaraan = CreateDynamicObject(18649, Float:0.0, Float:0.0, Float:0.0, Float:0.0, Float:0.0, Float:0.0, 0, 0, -1, Float:20.0,Float:20.0, -1, 0);

SendClientMessage(playerid, COLOR_GREEN, "Anda pasang neon hijau.");

//SetDynamicObjectMaterialText(tmpobjid, 0, "Pesawat Putu", 130, "Arial", 70, 1, 0xFFFFFFFF, 0x00000000, 1);



//SetDynamicObjectMaterialText(STREAMER_TAG_OBJECT contohdikendaraan, 0, "Solusi", 130, "Arial", 70, 1,? 0xFFFFFFFF, 0, 1);



//AttachObjectToVehicle(objectid, vehicleid, Float:OffsetX, Float:OffsetY, Float:OffsetZ, Float:RotX, Float:RotY, Float:RotZ)

pInfo[playerid][pNeon] = AttachDynamicObjectToVehicle( contohdikendaraan, GetPlayerVehicleID(playerid));

? /*

? Float:0.0, // kanan kiri

? Float:-2.0, // kedepan

? ? Float:0.0, // ke atas

? ? Float:2.0, Float:0.0, Float:0.0);

? */

//AttachDynamicObjectToVehicle(STREAMER_TAG_OBJECT objectid, vehicleid, Float:offsetx, Float:offsety, Float:offsetz, Float:rx, Float:ry, Float:rz)

//EditPlayerObject(playerid, objectid);

//RemovePlayerFromVehicle(playerid);

//EditAttachedObject(playerid, idterttach);

//EditObject(playerid, contohdikendaraan);

//contohdikendaraan = false;

? //Streamer_SetIntData(STREAMER_TYPE_OBJECT, contohdikendaraan, E_STREAMER_ATTACHED_VEHICLE, 2);

//Streamer_SetFloatData(

? //SetDynamicObjectMaterial(contohdikendaraan, 0, 10765, "airportgnd_sfse", "white", -256);

EditDynamicObject(playerid, contohdikendaraan);

? Streamer_Update(playerid);

//EditDynamicObject(playerid, pInfo[playerid][pNeon]);

//EditAttachedObject(playerid, contohdikendaraan);

return 1;

}


  [SOLVED] Cant spawn object from right AddSimpleModel just symbol "?" spawned
Posted by: PutuSuhartawan - 2021-04-15, 10:39 PM - Forum: Pawn Scripting - No Replies

PROBLEM :

Code:
AddSimpleModel(0, 5409, 20002, "mosque.dff", "mosque.txd");



SOLUTION :

Code:
// adding minus symbol (-) to index model has modded.

AddSimpleModel( -1, 5409,? -20002, "mosque.dff", "mosque.txd");







source?https://dev.prineside.com/en/gtasa_samp_model_id/model/5409-laepetrol1a/



Code:
CMD:addmosque(playerid, params[])

{

? new Float:pos[6];

? GetPlayerPos(playerid, pos[0], pos[1], pos[2]);



? new Float: angle;

? GetPlayerFacingAngle(playerid, angle);





?



? new object;// = CreateObject(model, pos[0]  (20.0 * floatsin(-angle, degrees)), pos[1]  (20.0 * floatcos(-angle, degrees)), pos[2]  5, 0, 0, angle);

? object = CreateObject(20002,pos[0], pos[1], pos[2], 0, 0, angle);

? //object = CreateDynamicObject(20002,pos[0], pos[1], pos[2], Float:0, Float:0, Float:0, GetPlayerVirtualWorld(playerid), GetPlayerInterior(playerid) );

? PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);



? new string[144];

? format(string, sizeof(string), "You have created a new object original : 5409, idobject in server : %i, position: %f, %f, %f, 0.0, 0.0, %f].", object, pos[0], pos[1], pos[2], angle);

? SendClientMessage(playerid, COLOR_RED, string);

? EditObject(playerid, object);

? //Streamer_Update(playerid, -1);

? //EditDynamicObject(playerid, labelajah[playerid]);

? SendClientMessage(playerid, 0xFFFFFFFF, "MOVE OBJECT: Hold the button of {FFFF00}~k~~PED_SPRINT~{FFFFFF} for free looking at.");



? return 1;

}


  [SOLVED] How to select Dynamic Object from Plugin Streamer?
Posted by: PutuSuhartawan - 2021-04-15, 10:04 PM - Forum: Pawn Scripting - No Replies

PROBLEM:



Code:
public OnPlayerSelectObject(playerid, type, objectid, modelid, Float:fX, Float:fY, Float:fZ)

{

? ? new message[526];



? ? if(type == SELECT_OBJECT_GLOBAL_OBJECT) {

? ? ? ? if(!IsValidObject(objectid)) return 0;

? ? ? ? format(message,sizeof(message),"[Global Object] Sir you have select line in server: %d, modelobjectID : %d, Pos: %.4f,%.4f,%.4f", objectid, modelid, fX, fY, fZ);

? ? ? ? SendClientMessage(playerid, 0xFFFFFFFF, message);

? ? ? ? EditObject(playerid, objectid);

? ? ? ? return 1;

}



if(type == SELECT_OBJECT_PLAYER_OBJECT) {

? ? ? ? if(!IsValidPlayerObject(playerid, objectid)) return 0;

? ? ? ? format(message,sizeof(message),"[Player Select player Object] Anda memilih baris proggram : %d modelID nya adalah: %dPos: %.4f,%.4f,%.4f", objectid, modelid, fX, fY, fZ);

? ? ? ? SendClientMessage(playerid, 0xFFFFFFFF, message);

? ? ? ? EditPlayerObject(playerid, objectid);

? ? ? ? //EditDynamicObject(playerid, objectid);

? ? ? ? SEM(playerid, "Dynamic edit after select non dynamic");

? ? ? ? return 1;



? ? if(type == STREAMER_OBJECT_TYPE_GLOBAL)

? ? {

? ? ? SEM(playerid, "Dynamic object type global");

? ? ? Streamer_Update(playerid, -1);

? ? ? EditDynamicObject(playerid, objectid);

? ? ? return 1;

? ? }

}





SOLUTION:

Code:
if(type == SELECT_OBJECT_PLAYER_OBJECT) {

? ? OnPlayerSelectDynamicObject(playerid, objectid, modelid, Float:fX, Float:fY, Float:fZ);

? ? ? // if(!IsValidPlayerObject(playerid, objectid)) return 0;

? ? ? ? format(message,sizeof(message),"[Player Select player Object] Anda memilih baris proggram : %d modelID nya adalah: %dPos: %.4f,%.4f,%.4f", objectid, modelid, fX, fY, fZ);

? ? ? ? SendClientMessage(playerid, 0xFFFFFFFF, message);

? ? ? ? EditPlayerObject(playerid, objectid);

? ? ? ? //EditDynamicObject(playerid, objectid);

? ? ? ? SEM(playerid, "Dynamic edit after select non dynamic");

? ? ? ? return 1;

? }


  Help with mysql ( I guess )
Posted by: Fuzzy - 2021-04-15, 02:12 PM - Forum: Pawn Scripting - Replies (1)

Hello , server is load perfect but for some reason in game database not loading , like when trying to register after you write password and press enter

nothing else shows up like it should be.

I use mysql 41-4 static , with log-core2.so


  Function does not load
Posted by: Axitz - 2021-04-15, 07:44 AM - Forum: Pawn Scripting - Replies (4)

Hi, my function does not load the giftboxes. Any idea why?



Function

Code:
function:OnLoadGiftboxes()

{

new rows = cache_num_rows(), iCount;

if(rows)

{

? ? new iGet[128];

? ? for(new i = 0; i != rows; i)

? ? {

? ? ? ? cache_get_field_content(i, "gbox_x", iGet);

Giftboxes[i][gbox_x] = floatstr(iGet);

? ? ? ? cache_get_field_content(i, "gbox_y", iGet);

Giftboxes[i][gbox_y] = floatstr(iGet);

? ? ? ? cache_get_field_content(i, "gbox_z", iGet);

Giftboxes[i][gbox_z] = floatstr(iGet);

iCount;

? ? }

}

ActivateGiftboxes(5);

printf("[Debug] Loaded %d/%d/%d giftboxes and 5 activations were sent.", iCount, rows, MAX_GIFTBOXES);

return 1;

}





Stock

Code:
stock ActivateGiftboxes(ggiftboxes)

{

for(new i = 0, l = ggiftboxes; i != l; i)

{

? ? printf("%d loading", i);

? ? new gbox = minrand(0, MAX_GIFTBOXES);

? ? new gbox_i = minrand(1, 15);

? ? new gboxe_obj = 19054;

? ? if(gbox_i == 1)

? ? {

? ? ? ? gboxe_obj = 19054;

? ? }

? ? if(gbox_i == 2)

? ? {

? ? ? ? gboxe_obj = 19055;

? ? }

? ? if(gbox_i == 3)

? ? {

? ? ? ? gboxe_obj = 19056;

? ? }

? ? if(gbox_i == 4)

? ? {

? ? ? ? gboxe_obj = 19057;

? ? }

? ? if(gbox_i == 5)

? ? {

? ? ? ? gboxe_obj = 19058;

? ? }

? ? if(gbox_i == 6)

? ? {

? ? ? ? gboxe_obj = 19054;

? ? }

? ? if(gbox_i == 7)

? ? {

? ? ? ? gboxe_obj = 19058;

? ? }

? ? if(gbox_i == 8)

? ? {

? ? ? ? gboxe_obj = 19058;

? ? }

? ? if(gbox_i == 9)

? ? {

? ? ? ? gboxe_obj = 19058;

? ? }

? ? if(gbox_i == 10)

? ? {

? ? ? ? gboxe_obj = 19058;

? ? }

? ? if(gbox_i == 11)

? ? {

? ? ? ? gboxe_obj = 19058;

? ? }

? ? if(gbox_i == 12)

? ? {

? ? ? ? gboxe_obj = 19055;

? ? }

? ? if(gbox_i == 13)

? ? {

? ? ? ? gboxe_obj = 19056;

? ? }

? ? if(gbox_i == 14)

? ? {

? ? ? ? gboxe_obj = 19058;

? ? }

? ? if(gbox_i == 15)

? ? {

? ? ? ? gboxe_obj = 19058;

? ? }

? ? Giftboxes[gbox][gbox_active] = true;

? ? Giftboxes[gbox][gbox_obj] = CreateDynamicObject(gboxe_obj, Giftboxes[gbox][gbox_x], Giftboxes[gbox][gbox_y], Giftboxes[gbox][gbox_z]-0.4, 0.0,0.0,0.0,-1,-1,-1,300.0);

printf("GBOX: %d was activated!", gbox);

}

return 1;

}


  Master Account system
Posted by: yllo - 2021-04-14, 11:29 PM - Forum: Videos and Screenshots - No Replies

Hi guys,



I have recently been coding a dynamic master account system which I'm designing for a roleplay script.



It currently displays two character?slots (which is also dynamic per account) and that characters skin ID and level. In this scenario I have both of my character slots used. One of my master account's characters has connected and logged in, and the other hasn't.



The script checks to see if the selected slot has already connected and if so it will send the player a warning message, telling them to connect using another slot!





[Video: https://youtu.be/255rlKAmcgc]





Let me know what you think!


  Help with INI
Posted by: Nightmare - 2021-04-14, 10:07 PM - Forum: Pawn Scripting - Replies (1)

Code:
#include <a_samp>



#include <YSI\y_ini>



#define? ? PATH_CONTAS? ? ? ? ? ? "Contas/%s.ini"



#define? ? DIALOG_REGISTRO? ? ? ? 0

#define? ? DIALOG_LOGIN? ? ? ? ? ? 1



enum pData

{

? ? Pass,

? ? Dinheiro,

? ? Banido,

? ? Skin

}

new PlayerData[MAX_PLAYERS][pData];



forward LoadUser_data(playerid, name[], value[]);



main()

{

print("\n\n\n=====================");

print("Servidor INICIANDO...? ? ? ");

print("=====================\n\n\n");

CarregarLog();

}



stock UserPath(playerid)

{

? ? new string[128];

? ? format(string, sizeof(string), PATH_CONTAS, pName(playerid));

? ? return string;

}



stock udb_hash(const buf[])

{

? ? new length=strlen(buf);

? ? new s1 = 1;

? ? new s2 = 0;

? ? new n;

? ? for (n=0; n<length; n)

? ? {

? ? ? s1 = (s1  buf[n]) % 65521;

? ? ? s2 = (s2  s1)? ? % 65521;

? ? }

? ? return (s2 << 16)  s1;

}



stock pName(playerid)

{

? ? new name[MAX_PLAYER_NAME];

? ? GetPlayerName(playerid, name, sizeof(name));

? ? return name;

}



public LoadUser_data(playerid, name[], value[])

{

? ? INI_Int("Senha", PlayerData[playerid][Pass]);

? ? INI_Int("Dinheiro", PlayerData[playerid][Dinheiro]);

? ? INI_Int("Banido", PlayerData[playerid][Banido]);

? ? INI_Int("Skin", PlayerData[playerid][Skin]);

? ? return 1;

}



public OnPlayerConnect(playerid)

{

? ? if(fexist(UserPath(playerid))

? ? {

? ? ? ? INI_ParseFile(UserPath(playerid), "LoadUser_%s", bExtra = true, extra = playerid);

? ? ? ? format(lib, sizeof(lib), "{FFFFFF}Bem Vindo ao {397BE6}Red {FFFFFF}Country {575656}[RPG/DM/FR]\n\

? ? ? ? {397BE6}Nick: {FFFFFF}%s\n{397BE6}Registrado: {00ff00}Sim\n\

? ? ? ? \n{575656}Insira sua senha para logar", pName(playerid));

? ? ? ? ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", lib, "Logar", "Sair");

? ? }

? ? else

? ? {

? ? ? ? format(lib, sizeof(lib), "{FFFFFF}Bem Vindo ao {397BE6}Red {FFFFFF}Country {575656}[RPG/DM/FR]\n\

? ? ? ? {397BE6}Nick: {FFFFFF}%s\n{397BE6}Registrado: {FF0000}N?o\n\

? ? ? ? \n{575656}Insira sua senha para se registrar", pName(playerid));

? ? ? ? ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Registro", lib, "Registrar", "Sair");

? ? }

? ? return 1;

}



public OnPlayerDisconnect(playerid)

{

? ? new INI:File = INI_Open(UserPath(playerid));

? ? INI_SetTag(File, "data");

? ? INI_WriteInt(File, "Dinheiro", GetPlayerMoney(playerid));

? ? INI_WriteInt("Banido", PlayerData[playerid][Pass]);

? ? INI_WriteInt("Skin", GetPlayerSkin(playerid));

? ? return 1;

}



public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

{

? ? switch (dialogid)

? ? {

? ? ? ? case DIALOG_REGISTRO:

? ? ? ? {

? ? ? ? ? ? if (!response) return Kick(playerid);? ? ? ?

? ? ? ? ? ? if (!(3 <= strlen(inputtext) <= 20))

? ? ? ? ? ? {

? ? ? ? ? ? ? ? new StrLogin[500];

? ? ? ? ? ? ? ? format(StrLogin, sizeof(StrLogin), "{FFFFFF}Bem Vindo ao {397BE6}Red {FFFFFF}Country {575656}[RPG/DM/FR]\n\

? ? ? ? ? ? ? ? {397BE6}Nick: {FFFFFF}%s\n{397BE6}Registrado: {FF0000}N?o\n\

? ? ? ? ? ? ? ? \n{575656}Insira sua senha para se registrar", pName(playerid));

? ? ? ? ? ? ? ? SendClientMessage(playerid, AMARELO, "ERRO: Insira uma senha de 3-20 caracteres!");

? ? ? ? ? ? ? ? ShowPlayerDialog(playerid, DIALOG_REGISTRO, DIALOG_STYLE_PASSWORD, "Registro", StrLogin, "Registrar", "Sair");

? ? ? ? ? ? ? ? return 1;

? ? ? ? ? ? }

? ? ? ? ? ? new INI:File = INI_Open(UserPath(playerid));

? ? ? ? ? ? INI_SetTag(File, "data");

? ? ? ? ? ? INI_WriteInt(File, "Senha", udb_hash(inputtext));

? ? ? ? ? ? INI_WriteInt(File, "Dinheiro", 2500);

? ? ? ? ? ? INI_WriteInt("Banido", 0);

? ? ? ? ? ? INI_Close(File);

? ? ? ? ? ? TogglePlayerSpectating(playerid, false);

? ? ? ? ? ? GivePlayerMoney(playerid, 2500);

? ? ? ? ? ? SendClientMessage(playerid, AMARELO, "Voc? se registrou com sucesso!");

? ? ? ? ? ? SendClientMessage(playerid, VERDE_DINHEIRO, "Voc? recebeu $2500!");

? ? ? ? }

? ? ? ? case DIALOG_LOGIN:

? ? ? ? {

? ? ? ? ? ? if(!response) return Kick(playerid);? ? ?

? ? ? ? ? ? new buf[129], StrLogin[500];

? ? ? ? ? ? if(udb_hash(inputtext) == PlayerInfo[playerid[Senha])

? ? ? ? ? ? {

? ? ? ? ? ? ? ? INI_ParseFile(UserPath(playerid), "LoadUser_%s", bExtra = true, extra = playerid);

? ? ? ? ? ? ? ? GivePlayerMoney(playerid, PlayerData[playerid][Dinheiro]);

? ? ? ? ? ? ? ? SetPlayerSkin(playerid, PlayerData[playerid][Skin]);

? ? ? ? ? ? ? ? SendClientMessage(playerid, 0x00FF00FF, "Voc? logou em sua conta com sucesso!");

? ? ? ? ? ? ? ? TogglePlayerSpectating(playerid, false);

? ? ? ? ? ? }

? ? ? ? ? ? else

? ? ? ? ? ? {

? ? ? ? ? ? ? ? format(StrLogin, sizeof(StrLogin), "{FFFFFF}Bem Vindo ao {397BE6}Red {FFFFFF}Country {575656}[RPG/DM/FR]\n\

? ? ? ? ? ? ? ? {397BE6}Nick: {FFFFFF}%s\n{397BE6}Registrado: {FF0000}N?o\n\

? ? ? ? ? ? ? ? \n{575656}Insira sua senha para se registrar", pName(playerid));

? ? ? ? ? ? ? ? if(tent[playerid] <= 0) return Kick(playerid);

? ? ? ? ? ? ? ? SendClientMessage(playerid, VERMELHO, "ERRO: Senha Incorreta!");

ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD, "Login", StrLogin, "Logar", "Sair");

? ? ? ? ? ? ? ? return 1;

? ? ? ? ? ? }

? ? ? ? }

? ? }

? ? return 1;

}

tts://imgur.com/UKuHCg

NOTE: i'm using sampctl

what's wrong here?



Error Print

https://imgur.com/UKuHCgi