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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,701
» Latest member: zein97174
» Forum threads: 2,356
» Forum posts: 12,303

Full Statistics

Online Users
There are currently 270 online users.
» 0 Member(s) | 267 Guest(s)
Google, Bing, Baidu

Latest Threads
Client issue with object
Forum: Support
Last Post: TheDoctor
2025-11-15, 08:00 PM
» Replies: 0
» Views: 41
San Andreas Police Pursui...
Forum: Advertisements
Last Post: BriBri
2025-11-15, 12:06 AM
» Replies: 0
» Views: 46
[Include] OpenGate (Abrir...
Forum: Portuguese/Portugu?s
Last Post: Crazy_ArKzX
2025-11-13, 06:49 PM
» Replies: 0
» Views: 40
OpenGate (Open Proximity ...
Forum: Libraries
Last Post: Crazy_ArKzX
2025-11-13, 06:46 PM
» Replies: 0
» Views: 49
LS City Hall
Forum: Maps
Last Post: cosminupgaming
2025-11-12, 04:22 PM
» Replies: 3
» Views: 2,674
Crime Base
Forum: Maps
Last Post: cosminupgaming
2025-11-12, 04:19 PM
» Replies: 2
» Views: 1,262
GTA SA-MP Scripting: Issu...
Forum: General Discussions
Last Post: williamrhein
2025-11-12, 10:16 AM
» Replies: 0
» Views: 61
is it worth creating a se...
Forum: General Discussions
Last Post: cosminupgaming
2025-11-11, 05:30 PM
» Replies: 13
» Views: 18,377
Looking for an English De...
Forum: General Discussions
Last Post: cosminupgaming
2025-11-11, 05:21 PM
» Replies: 2
» Views: 2,825
Awakeninga an old server.
Forum: Support
Last Post: drwnrbbt
2025-11-11, 02:26 PM
» Replies: 0
» Views: 60

 
Sad Problem with OnPlayerClickTextdraw
Posted by: shane adevaratu - 2020-12-22, 04:37 PM - Forum: Pawn Scripting - Replies (7)

The OnPlayerClickTextdraw function is no longer called.

I use y_hooks in different includes to call this function. The rest of the functions that use y_hooks work,?less this.



Has anyone been through this and solved it, or do you have any idea what it might be?

A few days ago it worked perfectly.?I tried to disable each include that uses this function, or call them in the general public on gamemode, but the problem is still.


  Problem with percentage
Posted by: GospodinX - 2020-12-22, 10:32 AM - Forum: Pawn Scripting - Replies (3)

Hi guys



I use percentage for many things in my SA-MP server.(discounts,tax etc),but I have some problems with it.



For "small" numbers it work pretty nice.



Code:



Code:
new result = PERCENT*PRICE/100;



printf("Result: %d",result);





First test:

PERCENT: 75

PRICE: 140 000 000

Result:?19100654



Result is ok



Second test:

PERCENT: 75

PRICE: 340 000 000

Result:?-17698038



Result is wrong





Does anyone have idea how I should fix it?


  Adding dialog box for event
Posted by: jenab - 2020-12-21, 10:18 PM - Forum: Pawn Scripting - Replies (2)

Hi, I'm new on scripting and sorry if i can't understand everything well.



So my problem is i have this requestevent codes:



Code:
if(strcmp(cmd, "/requestevent", true) == 0 || strcmp(cmd, "/re", true) == 0)

{

if(PINFO[playerid][pLevel]<5)return SEM(playerid, "Your level is too low to organize an event.");

if(IsThereEvent)return SEM(playerid, "There is an event already.");

if(HasWanted(playerid)||IsAtjail(playerid)||InSleep[playerid]==1)return SEM(playerid, "You can't request an event right now.");

ShowPlayerDialog(playerid,5010,DIALOG_STYLE_INPUT,"Request an Event","Enter the title of event below","Done","Close");

return 1;

}





And then more codes for dialogs is this:



Code:
if(dialogid == 5010)

{

if(!response)return 1;

if(!IsUsingValidHex(inputtext))

{

if(strlen(inputtext)>=21||strlen(inputtext)<=2)return ShowPlayerDialog(playerid,5010,DIALOG_STYLE_INPUT,"{FF0000}* Enter a title between 3 to 20 characters.\n{A9C4E4}Request an Event","Enter the title of event below","Done","Close");

? ? strcpy(ReqTitle[playerid],inputtext,30);

? ? ShowPlayerDialog(playerid, 5011, DIALOG_STYLE_LIST, "Select the type of event", "Duel\nLast Man Standing\nLast Car Standing\nRace\nProtect the VIP\nDice\nPaintball", "Done", "Back");

}

else

{

if(strlen(inputtext)>=29||strlen(inputtext)<=2)return ShowPlayerDialog(playerid,5010,DIALOG_STYLE_INPUT,"{FF0000}* Enter a title between 3 to 28 characters.\n{A9C4E4}Request an Event","Enter the title of event below","Done","Close");

? ? strcpy(ReqTitle[playerid],inputtext,30);

? ? ShowPlayerDialog(playerid, 5011, DIALOG_STYLE_LIST, "Select the type of event", "Duel\nLast Man Standing\nLast Car Standing\nRace\nProtect the VIP\nDice\nPaintball", "Done", "Back");

}

}

if(dialogid == 5011)

{

if(!response){ShowPlayerDialog(playerid,5010,DIALOG_STYLE_INPUT,"Request an Event","Enter the title of event below","Done","Close");return 1;}

ReqType[playerid]=listitem;

ShowInteriorList(playerid);

}

if(dialogid == 5012)

{

if(!response){ShowPlayerDialog(playerid, 5011, DIALOG_STYLE_LIST, "Select the type of event", "Duel\nLast Man Standing\nLast Car Standing\nRace\nProtect the VIP\nDice\nPaintball", "Done", "Back");return 1;}

ReqInt[playerid]=listitem;

ShowPlayerDialog(playerid, 5013, DIALOG_STYLE_INPUT, "Request an Event", "Enter the prize of event below", "Done", "Back");

}

if(dialogid == 5013)

{

if(!response){ShowInteriorList(playerid);return 1;}

new val=strval(inputtext);

if(val<10000||val>1000000)return ShowPlayerDialog(playerid, 5013, DIALOG_STYLE_INPUT, "Request an Event", "{FF0000}* Invalid prize entered.\n{A9C4E4}Enter the prize of event below", "Done", "Back");

ReqPrize[playerid]=val;

? ? ShowPlayerDialog(playerid, 5014, DIALOG_STYLE_INPUT, "Request an Event", "Enter minimum level to join your event below", "Done", "Back");

}

if(dialogid == 5014)

{

if(!response){ShowPlayerDialog(playerid, 5013, DIALOG_STYLE_INPUT, "Request an Event", "Enter the prize of event below", "Done", "Back");return 1;}

new val=strval(inputtext);

if(val<1||val>15)return ShowPlayerDialog(playerid, 5014, DIALOG_STYLE_INPUT, "Request an Event", "{FF0000}* Invalid level entered.\n{A9C4E4}Enter minimum level to join your event below", "Done", "Back");

ReqMinLevel[playerid]=val;

ShowPlayerDialog(playerid, 5015, DIALOG_STYLE_INPUT, "Request an Event", "Enter maximum level to join your event below", "Done", "Back");

}

if(dialogid == 5015)

{

if(!response){ShowPlayerDialog(playerid, 5014, DIALOG_STYLE_INPUT, "Request an Event", "Enter minimum level to join your event below", "Done", "Back");return 1;}

new val=strval(inputtext);

if(val<90||val>200)return ShowPlayerDialog(playerid, 5014, DIALOG_STYLE_INPUT, "Request an Event", "{FF0000}* Invalid level entered.\n{A9C4E4}Enter maximum level to join your event below", "Done", "Back");

ReqMaxLevel[playerid]=val;

ShowPlayerDialog(playerid, 5016, DIALOG_STYLE_INPUT, "Request an Event", "If you want have Event-Helper for help you by organizing, enter their ID or part of their name", "Done", "Back");

}

if(dialogid == 5016)

{

if(!response){ShowPlayerDialog(playerid, 5015, DIALOG_STYLE_INPUT, "Request an Event", "Enter maximum level to join your event below", "Done", "Back");return 1;}

new len=strlen(inputtext), target, msg[300];

if(len>=1)// Entered

{

target = ReturnUser6(inputtext);

if(!IsPlayerConnected(target))return ShowPlayerDialog(playerid, 5016, DIALOG_STYLE_INPUT, "{FF0000}* This player isn't connected.\n{A9C4E4}Request an Event", "If you want have Event-Helper for help you by organizing, enter their ID or part of their name", "Done", "Back");

if(target==playerid)return ShowPlayerDialog(playerid, 5016, DIALOG_STYLE_INPUT, "{FF0000}* You can't be event helper.\n{A9C4E4}Request an Event", "If you want have Event-Helper for help you by organizing, enter their ID or part of their name", "Done", "Back");

? if(HasWanted(target)||IsAtjail(target)||AFK[target]!=0)return ShowPlayerDialog(playerid, 5016, DIALOG_STYLE_INPUT, "{FF0000}* You can't select this player as event helper.\n{A9C4E4}Request an Event", "If you want have Event-Helper for help you by organizing, enter their ID or part of their name", "Done", "Back");

ReqHamkar[playerid]=target;

format(msg, sizeof(msg), "Are these informations correct about your event?\n{A9C4E4}Event Title: %s\n{A9C4E4}Event Prize: $%s\n{A9C4E4}Min-Max level: %d-%d\n{A9C4E4}Event Type: %s\n{A9C4E4}Location: %s\n{A9C4E4}Organizer: %s, Helper: %s", ReqTitle[playerid], FormatNumber(ReqPrize[playerid]), ReqMinLevel[playerid], ReqMaxLevel[playerid], GetEventTypeName(ReqType[playerid]), GetEventInteriorName(ReqType[playerid], ReqInt[playerid]), RPName(playerid), RPName(ReqHamkar[playerid]));

ShowPlayerDialog(playerid, 5017, DIALOG_STYLE_MSGBOX, "Request an Event", msg, "Yes", "No");

}

else// Not entered

{

format(msg, sizeof(msg), "Are these informations correct about your event?\n{A9C4E4}Event Title: %s\n{A9C4E4}Event Prize: $%s\n{A9C4E4}Min-Max level: %d-%d\n{A9C4E4}Event Type: %s\n{A9C4E4}Location: %s\n{A9C4E4}Organizer: %s", ReqTitle[playerid], FormatNumber(ReqPrize[playerid]), ReqMinLevel[playerid], ReqMaxLevel[playerid], GetEventTypeName(ReqType[playerid]), GetEventInteriorName(ReqType[playerid], ReqInt[playerid]), RPName(playerid));

ShowPlayerDialog(playerid, 5017, DIALOG_STYLE_MSGBOX, "Request an Event", msg, "Yes", "No");

}

}



if(dialogid == 5018)

if(dialogid == 5018)

{

if(!response)return 1;

if(ReqHamkar[playerid]!=9999&&!IsPlayerConnected(ReqHamkar[playerid])){ReqHamkar[playerid]=9999;}

if(HasWanted(playerid)||IsAtjail(playerid)||AFK[playerid]!=0||IsThereEvent)return SEM(playerid, "You can't request this event right now.");

? ? if(ReqHamkar[playerid]!=9999){if(HasWanted(ReqHamkar[playerid])||IsAtjail(ReqHamkar[playerid])||AFK[ReqHamkar[playerid]]!=0||IsThereEvent)return SEM(playerid, "You can't request this event right now.");}

? ? if(ReqHamkar[playerid]!=9999){SendEventRequest(playerid, ReqTitle[playerid], ReqPrize[playerid], ReqMinLevel[playerid], ReqMaxLevel[playerid], ReqType[playerid], ReqInt[playerid], ReqHamkar[playerid]);}

? ? if(ReqHamkar[playerid]==9999){SendEventRequest(playerid, ReqTitle[playerid], ReqPrize[playerid], ReqMinLevel[playerid], ReqMaxLevel[playerid], ReqType[playerid], ReqInt[playerid], 9999);}

}







this is the whole code for my event system, now i tried to add another dialog so player can write the rules of event but i couldn't make it. can anyone help me to do that?


  Sublime Text Not Working with SAMPCTL!
Posted by: Clansman - 2020-12-21, 05:50 PM - Forum: Pawn Scripting - Replies (1)

Every time I run sampctl package build with YSI included in my gamemode it doens't compile. Nothing shows on the console and the amx stays 0 bytes

verbose

Code:
INFO: failed to get version information: reference not found
INFO: Package does not have any tags, consider versioning your code with: `sampctl package release`
INFO: clansman/myfuckingserver read package from directory /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver
INFO: clansman/myfuckingserver building dependency tree and ensuring cached copies
INFO: |- clansman/myfuckingserver is parent
INFO: |- iterating 5 dependencies of clansman/myfuckingserver
INFO: |-|- github.com/sampctl/samp-stdlib ensured
INFO: |-|- iterating 1 dependencies of sampctl/samp-stdlib
INFO: |-|-|- github.com/sampctl/pawn-stdlib ensured
INFO: |-|-|- iterating 0 dependencies of sampctl/pawn-stdlib
INFO: |-|- github.com/maddinat0r/sscanf ensured
INFO: |-|- added target path for resource includes: /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/.resources/sscanf-7b5726
INFO: |-|- ignoring platform mismatch windows
INFO: |-|- github.com/maddinat0r/sscanf is a plugin
INFO: |-|- iterating 0 dependencies of maddinat0r/sscanf
INFO: |-|- github.com/pawn-lang/[email protected] ensured
INFO: |-|- iterating 5 dependencies of pawn-lang/YSI-Includes
INFO: |-|-|- github.com/oscar-broman/md-sort ensured
INFO: |-|-|- iterating 1 dependencies of oscar-broman/md-sort
INFO: |-|-|- already visited github.com/sampctl/samp-stdlib
INFO: |-|- already visited github.com/sampctl/samp-stdlib
INFO: |-|-|- github.com/Y-Less/code-parse.inc ensured
INFO: |-|-|- iterating 0 dependencies of Y-Less/code-parse.inc
INFO: |-|-|- github.com/Y-Less/indirection ensured
INFO: |-|-|- iterating 2 dependencies of Y-Less/indirection
INFO: |-|-|- already visited github.com/sampctl/samp-stdlib
INFO: |-|-|-|- github.com/Zeex/amx_assembly ensured
INFO: |-|-|-|- iterating 0 dependencies of Zeex/amx_assembly
INFO: |-|- already visited github.com/Zeex/amx_assembly
INFO: |-|- github.com/katursis/Pawn.RakNet ensured
INFO: |-|- ignoring platform mismatch windows
INFO: |-|- github.com/katursis/Pawn.RakNet is a plugin
INFO: |-|- iterating 0 dependencies of urShadow/Pawn.RakNet
INFO: |-|- github.com/samp-incognito/samp-streamer-plugin ensured
INFO: |-|- added target path for resource includes: /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/.resources/samp-streamer-plugin-7c00b9
INFO: |-|- ignoring platform mismatch windows
INFO: |-|- github.com/samp-incognito/samp-streamer-plugin is a plugin
INFO: |-|- iterating 0 dependencies of samp-incognito/samp-streamer-plugin
INFO: clansman/myfuckingserver flattened dependencies to 10 leaves
INFO: Checking for cached package pawn-v3.10.8-linux.tgz in /home/clansman/.samp
INFO: setting permissions for binaries
INFO: Using cached package pawn-v3.10.8-linux.tgz
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/samp-stdlib
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/pawn-stdlib
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/YSI-Includes
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/md-sort
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/code-parse.inc
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/indirection
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/amx_assembly
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/Pawn.RakNet/src
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/.resources/sscanf-7b5726
INFO: using include path /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/.resources/samp-streamer-plugin-7c00b9
INFO: building clansman/myfuckingserver with 3.10.8
INFO: executing compiler in /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/gamemodes as [LD_LIBRARY_PATH=/home/clansman/.samp/pawn/3.10.8 DYLD_LIBRARY_PATH=/home/clansman/.samp/pawn/3.10.8] [/home/clansman/.samp/pawn/3.10.8/pawncc /mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/gamemodes/MyGM.pwn -D/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/gamemodes -o/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/gamemodes/MyGM.amx -d3 -; -( -Z -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/samp-stdlib -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/pawn-stdlib -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/YSI-Includes -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/md-sort -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/code-parse.inc -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/indirection -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/amx_assembly -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/Pawn.RakNet/src -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/.resources/sscanf-7b5726 -i/mnt/f/Games/Rockstar Games/GTA San Andreas/myfuckingserver/dependencies/.resources/samp-streamer-plugin-7c00b9 DEVELOPMENT=true]


  Error - compiler - functions may not return arrays of unknown size
Posted by: vandiesel45 - 2020-12-21, 02:06 PM - Forum: Pawn Scripting - Replies (3)

I have this errors with the latest pawn compiler





Code:
error 092: functions may not return arrays of unknown size (symbol "Adrian")



that's de line:

Code:
Adrian(B, item, 0);



this is stock:



Code:
stock Adrian(playerid, string[], V)

{

new A, B, C;

if(!V)

{

? ? switch(random(5))

? ? {

? ? ? ? case 0: V = 1;

? ? ? ? case 1: V = 3;

? ? ? ? case 2: V = 5;

? ? ? ? case 3: V = 7;

? ? ? ? case 4: V = 9;

? ? }

? ? PlayerInfo[playerid][pLoserLevel] = V;

}

switch(V)

{

case 1:

{

A = 3;

B = 4;

C = 7;

}

case 3:

{

A = 8;

B = 9;

C = 1;

}

case 5:

{

A = 3;

B = 7;

C = 4;

}

case 7:

{

A = 1;

B = 3;

C = 9;

}

case 9:

{

A = 5;

B = 2;

C = 6;

}

}

for(new i, l = strlen(string); i < l; i)

{

switch(string[i])

{

? ? case 48..57:

{

string[i] = A;

if(string[i] > 57) string[i] -= 10;

}

? ? case 65..90:

{

string[i] = B;

if(string[i] > 90) string[i] -= 26;

}

case 97..122:

{

? ? string[i] = C;

if(string[i] > 122) string[i] -= 26;

}

}

}

return string;

}


  Virtual worlds
Posted by: Ryder Sixz - 2020-12-21, 12:48 PM - Forum: Pawn Scripting - Replies (4)

Hello everyone! Could someone please explain virtual worlds to me ((How are they created, what is the limit, etc.))?. I read it on the wiki but it was not entirely clear to me. I would appreciate it very much, greetings to all!


  YSI INI_Load and Command_ReProcess const correctness
Posted by: Jarnokai - 2020-12-21, 12:06 PM - Forum: Pawn Scripting - Replies (1)

Hi, I have asked about this same problem about a year ago but got no answers.

Yesterday I decided to check back on my script and found the same issue still presists, so I ask now:



I use the y_commands function "Command_ReProcess" to call commands from the script, as in "to fake commands". This means that when a player does something, I might call the command "/quitrace" for example, to make sure the player's actions don't interfere with the ongoing race they are participating.



I can no longer pass literal strings into this function, as the compiler comes up with warnings. How can I keep using the function like this while keeping the warnings away? Or am I misusing the function in some way?



Another, seemingly obvious (to me) false positive comes from using INI_Load with a pre-determined file - I load my server's saved information from a file with a static filename in the server files, but now by passing a literal string as the filename I get const correctness errors.



Any ideas to fix this?





I used sampctl ensure to check that all dependencies are at their newest version, but maybe I am doing something wrong. I never really had time to learn to use sampctl.


  Snow plowing - Job Presentation
Posted by: DraGoN - 2020-12-21, 06:53 AM - Forum: Videos and Screenshots - Replies (8)


  LSCC - WINTER UPDATE TRAILER
Posted by: Los Santos Copchase - 2020-12-21, 02:37 AM - Forum: Videos and Screenshots - No Replies


  (4770) : warning 213: tag mismatch
Posted by: Stones - 2020-12-21, 02:01 AM - Forum: Pawn Scripting - Replies (3)

I'm finally returning to SAMP again after so many years, i'm just learning to code once again, not i'm getting a tag mismatch for this VIP stuff.



This is part of something that is displayed in the stats command, this is the command i'm getting the warning from.

PHP Code:
SendClientMessage(playeridCOLOR_GRAYstr);



format(strsizeof(str), "> Age: [%d] | Money: [%d] | VIP: [%s]"Character[playerid][Age], Character[playerid][Cash], VIPRANKS[Character[playerid][pVIP]][0]); 



This is the SQL data saved upon registration.

PHP Code:
mysql_format(SQL_CONNECTIONquerysizeof(query), "UPDATE Accounts SET Admin = %d, VIP = %d WHERE SQLID = %d LIMIT 1",



Account[playerid][Admin],

Account[playerid][pVIP],

Account[playerid][SQLID]); 



And these are the ranks specifically used in as seen above

PHP Code:
VIPRANKS[Character[playerid][pVIP]][0


PHP Code:
new VIPRANKS[][] =

{

"None",

"Bronze",

"Silver",

"Gold",

"Lifetime"

}; 



Please forgive me if i'm missing something obvious :)