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

Username
  

Password
  





Search Forums



(Advanced Search)

Forum Statistics
» Members: 7,225
» Latest member: Arzeux010
» Forum threads: 2,373
» Forum posts: 12,327

Full Statistics

Online Users
There are currently 101 online users.
» 0 Member(s) | 99 Guest(s)
Bing, Google

Latest Threads
Liberty City map
Forum: Pawn Scripting
Last Post: ziyadprogamer
2025-06-28, 04:55 PM
» Replies: 2
» Views: 2,116
GameText styles in open.m...
Forum: Pawn Scripting
Last Post: Miki
2025-06-28, 01:25 PM
» Replies: 1
» Views: 32
Very Basic SAMP UCP
Forum: Videos and Screenshots
Last Post: bullyalina
2025-06-28, 12:43 PM
» Replies: 49
» Views: 12,736
Script[gamemodes/gamemode...
Forum: Pawn Scripting
Last Post: Miki
2025-06-27, 05:08 PM
» Replies: 1
» Views: 423
Want to edit my profile n...
Forum: Chat
Last Post: Hera.
2025-06-26, 08:41 PM
» Replies: 1
» Views: 534
Farsi
Forum: Other
Last Post: acc.gangbeni
2025-06-25, 08:21 AM
» Replies: 2
» Views: 3,052
Las Venturas Gang Wars - ...
Forum: Advertisements
Last Post: lvgwgta
2025-06-22, 06:47 PM
» Replies: 0
» Views: 43
[Request] Linko Gaming Ro...
Forum: General Discussions
Last Post: JamesC
2025-06-20, 07:34 PM
» Replies: 0
» Views: 59
RevolutionX DM/Stunt/Race...
Forum: Advertisements
Last Post: DerekZ905
2025-06-18, 03:12 PM
» Replies: 0
» Views: 82
samp-cef
Forum: Questions and Suggestions
Last Post: jamespssamp
2025-06-18, 11:36 AM
» Replies: 0
» Views: 66

 
  TSYS RPG system toolkit - depreciated
Posted by: _tAxI_ - 2021-05-18, 03:21 PM - Forum: Libraries - No Replies

What is it? -? This is a integrated RPG type system for SA-MP with SQlite backend saving (is that even still a thing???)



What does it do? - Adds RPG type functionallity such as: Vehicle ownership and control (modsaving, booby traps, spawn location setting, admin locking and administrator functions etc), Vehicle fuel system, house ownership system, business ownership system, basic anticheat (will likely need an overhaul though), Banking and money tracking (ATM etc), minimap icon streaming, user login and autosaving etc.



Depreciated??? - I haven't worked on this code in years and likely never will again... I was however asked by a member of the community to re-post the code i designed years ago up here for the very few that still use it lol (Thanks Russian RPG Fam!)



Instructions for use and integration are in the readme file. This system also has in game editing for some of the systems but largely speaking it uses a batch import system which requires a specific formatting to startup the server and get everything ready to go so make sure to READ IT BEFORE STARTING THE SERVER FIRST TIME.



I'm uploading it to my own private server so it shouldn't disappear any time soon. Use what you want, any way you want, and enjoy. This is posted up completely open with no restrictions so go to town guys.



A Demo of the fully integrated system can be downloaded from This Thread.



Download


  3d iterator array
Posted by: K.a.r.o.l - 2021-05-18, 11:35 AM - Forum: Pawn Scripting - Replies (1)

Hi i?have the latest version of ysi 5.05.0301 but i have a problem with 3d iterator array.





Code:
new

Iterator:Iter3[5][8]<10>;

for (new i = 0; i != Iter_InternalSize(Iter3); )

{

Iter_Init(Iter3[i]);

}

Iter_Add(Iter3[3][6], 7);







Errors:





error 017: undefined symbol "Iter_InternalSize"

error 028: invalid subscript (not an array or too many subscripts): "Iter_Init@Iter3"

warning 215: expression has no effect

error 001: expected token: ";", but found "]"

error 029: invalid expression, assumed zero

fatal error 107: too many error messages on one line





i also tried this





Code:
#define SIZE 5

new

Iterator:Iter3[SIZE][8]<10>;

for (new i = 0; i != SIZE; )

{

Iter_Init(Iter3[i]);

}

Iter_Add(Iter3[3][6], 7);





and this





Code:
for (new i = 0; i != Iter_InternalSize(Iter3); )

{

Iter_InitInternal(Iter_InternalArray(Iter3[i]), Iter_InternalSize(Iter3[]), Iter_InternalSize(Iter3[][]) - 1);

}





but its doesnt work



Pls help


  [Solved] Get Difference Between Time Period
Posted by: Radical - 2021-05-18, 12:34 AM - Forum: Pawn Scripting - Replies (3)

I have an function to get difference between time period.

But it has a little problem. If start_hour is the current hour and stop_hour is 24am, it does not accurately calculate the difference Between Time.



Code:
new start_hour, start_minute, start_second, hours, minutes, seconds;



gettime(start_hour, start_minute, start_second);

DifferenceBetweenTimePeriod(start_hour, 24, start_minute, 0, start_second, 0, hours, minutes, seconds);







function:

Code:
DifferenceBetweenTimePeriod(start_hour, stop_hour, start_minute, stop_minute, start_second, stop_second, &hours, &minutes, &seconds) {

? ? while (stop_second > start_second) {

? ? ? ? --start_minute;

? ? ? ? start_second = 60;

? ? }

? ? seconds = start_second - stop_second;

? ? while (stop_minute > start_minute) {

? ? ? ? --start_hour;

? ? ? ? start_minute = 60;

? ? }

? ? minutes = start_minute - stop_minute;

? ? hours = start_hour - stop_hour;

}



Is there a problem with the function?



Solved:



This is resolved if I put?24 in?start_hour.

Code:
DifferenceBetweenTimePeriod(24,?start_hour, start_minute, 0, start_second, 0, hours, minutes, seconds);


  [SOLVED] How Find New ID from enum for SQL with forward loop function ?
Posted by: PutuSuhartawan - 2021-05-18, 12:01 AM - Forum: Pawn Scripting - Replies (4)

SOLUTION:

Need get cahce?GetSVarInt("SlotTrunkUsed")

Code:
GetFreeTrunkID(v, s)

{

????for (new i = 1; i <= 100; i)

????{

????????if (!get_vehicle_trunk[v][s][i])

????????{

????????????return i  GetSVarInt("SlotTrunkUsed");

????????}

????}

????return -1; //Return -1 when there is no free trunk ID

}



return SQL:

Code:
? ? ? ? ? ? ? if(sscanf( inputtext, "iiiii", targetOC_ID, slot, item_type, amount, value)) return SCM(playerid, -1, "USAGE: [targetOC_ID]? [slot] [item_type] [amount] [value]");



? ? ? ? ? ? ? new playa,carid=GetRealIdCar(targetOC_ID);



? ? ? ? ? ? ? SetPVarInt(playerid, "SelectedSlot", slot);



? ? ? ? ? ? ? printf("DEBUG: Checking VID changer from vehicle ID:[%d]", carid);



? ? ? ? ? ? ?



? ? ? ? ? ? ? if(slot >= MAX_TRUNK_SLOTS || slot <= 0) return SCM(playerid, -1, "VEHICLE: Max trunk slot is 3 sir.",1);



? ? ? ? ? ? ? printf("DEBUG: Adding item trunk in slot:[%d]", slot);



? ? ? ? ? ? ? LoadOCTrunks(playerid, carid);



? ? ? ? ? ? ? if(get_vehicle_trunk[carid][slot][TRUNK_SLOT]==slot) return SCM(playerid, -1, "OC_TRUNK: That slot has been used in this vehicle sir. Please remove item from this slot first.",1);



? ? ? ? ? ? ?



? ? ? ? ? ? ? /*



? ? ? ? ? ? ? ? for(new s=1; s<=10; s)



? ? ? ? ? ? ? ? ? ? {



? ? ? ? ? ? ? ? ? ? ? ? if(get_vehicle_trunk[carid][s][TRUNK_SQL_ID]>0)continue;



? ? ? ? ? ? ? ? ? ? ? ? if(get_vehicle_trunk[carid][s][TRUNK_SQL_ID]==slot)



? ? ? ? ? ? ? ? ? ? ? ? {







? ? ? ? ? ? ? ? ? ? ? ? break;



? ? ? ? ? ? ? ? ? ? ? ? }



? ? ? ? ? ? ? ? ? ? }



? ? ? ? ? ? ? */



? ? ? ? ? ? ? if(!IsValidVehicle(carid))return SCM(playerid, -1, "VEHICLE: Thats vehicle has not exist sir.",1);



? ? ? ? ? ? ? printf("DEBUG: Slot filter hassben passed sir");



? ? ? ? ? ? ? new VID = targetOC_ID;



? ? ? ? ? ? ? new result = n_mysql_query(g_Sql, "SELECT * FROM `trunkdata`", true); //ORDER BY oc_id ASC, slot ASC



? ? ? ? ? ? ? new rows = cache_num_rows();



? ? ? ? ? ? ? new number=get_vehicle_trunk[carid][slot][TRUNK_SQL_ID];



? ? ? ? ? ? ? for(new v; v<=MAX_VEHICLES; v)



? ? ? ? ? ? ? {



? ? ? ? ? ? ? ? ? ? for(new slot; slot<=MAX_TRUNK_SLOTS; slot)



? ? ? ? ? ? ? ? ? ? {



? ? ? ? ? ? ? ? ? ?



? ? ? ? ? ? ? ? ? ? ? for(new idx; idx <= rows; idx )



? ? ? ? ? ? ? ? ? ? ? ? ? {



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cache_get_value_int(idx, "id", get_vehicle_trunk[v][slot][TRUNK_SQL_ID] );



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? /*



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(get_vehicle_trunk[v][slot][TRUNK_SQL_ID]>0)continue;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? printf("[TRUNK]: New id:[%d]", number );



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? {



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? NewSQL_ID = number;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? NewSQL_ID = number;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? printf("[TRUNK]: New final SQL id:[%d]", number );







? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //if(NewSQL_ID ==0 )



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break; // find emty slot vehicle ID. with find number primary car player



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? }*/



? ? ? ? ? ? ? ? ? ? ? ? ? }?



? ? ? ? ? ? ? ? ? ? }











? ? ? ? ? ? ? }



? ? ? ? ? ? ?



? ? ? ? ? ? ? cache_delete(result);



? ? ? ? ? ? ? NewSQL_ID = GetFreeTrunkID(carid, slot); printf("[TRUNK ID]: New final SQL id:[%d]", NewSQL_ID );



? ? ? ? ? ? ? format(str, sizeof(str), "{FFBBBB}DEBUG: NewSQL_ID: [%i]", NewSQL_ID); SCM(playerid, 0xFFCCCCFF, str);







? ? ? ? ? ? ? if(NewSQL_ID==0)return SCM(playerid, -1, "{FFBBBB}SQL: {FFFFFF}System new ID SQL was failed sir");



? ? ? ? ? ? ? if(NewSQL_ID>=0)printf("{FFBBBB}DEBUG: New id SQL trunk has been found",VID,GetRPName(playerid));



? ? ? ? ? ? ?



? ? ? ? ? ? ? slot, get_vehicle_trunk[carid][slot][TRUNK_ITEM_TYPE] = item_type, get_vehicle_trunk[carid][slot][TRUNK_ITEM_AMOUNT] = amount, get_vehicle_trunk[carid][slot][TRUNK_ITEM_VALUE] = value;



? ? ? ? ? ? ? //get_vehicle_trunk[carid][slot][TRUNK_SQL_ID]=get_vehicle_trunk[carid][slot][TRUNK_SQL_ID];



? ? ? ? ? ? ? if(get_vehicle_trunk[carid][slot][TRUNK_SQL_ID] == NewSQL_ID)



? ? ? ? ? ? ? {







? ?



? ? ? ? ? ? ? ? ? format(str, sizeof(str), "UPDATE `trunkdata` SET `oc_id`='%d',`slot`='%d',`item_type`='%d',`amount`='%d',`value`='%d',`owner_id`='%d' WHERE `id`='%d'", VID, slot, item_type, amount, value, pInfo[playerid][ID],? NewSQL_ID);



? ? ? ? ? ? ? ? ? n_mysql_query(g_Sql, str);



? ? ? ? ? ? ? ? ? get_vehicle_trunk[carid][slot][TRUNK_SQL_ID] = NewSQL_ID;



? ? ? ? ? ? ? }



? ? ? ? ? ? ? else



? ? ? ? ? ? ? {



? ? ? ? ? ? ? ? ? format(str, sizeof(str), "INSERT INTO `trunkdata` (`id`, `owner_id`, `oc_id`, `slot`, `item_type`, `amount`, `value`) VALUES ('%d', '%d', '%d', '%d', '%d', '%d', '%d')", NewSQL_ID, pInfo[playerid][ID], VID, slot, item_type, amount, value);



? ? ? ? ? ? ? ? ? n_mysql_query(g_Sql, str);



? ? ? ? ? ? ? ? ? SetSVarInt("SlotTrunkUsed", NewSQL_ID);



? ? ? ? ? ? ? }



? ? ? ? ? ? ? ?







? ? ? ? ? ? ? SCM(playerid,-1,"VEHICLE: You have adding item at this trunk vehicle",2);

? ? ? ? ? ? ? SendClientMessage(playerid,-1, str);

PROBLEM: No icrement in new ID maker from enum.

Code:
if(sscanf( inputtext, "iiiii", targetOC_ID, slot, item_type, amount, value)) return SCM(playerid, -1, "USAGE: [targetOC_ID]? [slot] [item_type] [amount] [value]");

? ? ? ? ? ? ? new playa,carid=GetRealIdCar(targetOC_ID);

? ? ? ? ? ? ? SetPVarInt(playerid, "SelectedSlot", slot);

? ? ? ? ? ? ? printf("DEBUG: Checking VID changer from vehicle ID:[%d]", carid);

? ? ? ? ? ? ?

? ? ? ? ? ? ? if(slot >= MAX_TRUNK_SLOTS || slot <= 0) return SCM(playerid, -1, "VEHICLE: Max trunk slot is 3 sir.",1);

? ? ? ? ? ? ? printf("DEBUG: Adding item trunk in slot:[%d]", slot);

? ? ? ? ? ? ? LoadOCTrunks(playerid, carid);

? ? ? ? ? ? ? if(get_vehicle_trunk[carid][slot][TRUNK_SLOT]==slot) return SCM(playerid, -1, "OC_TRUNK: That slot has been used in this vehicle sir. Please remove item from this slot first.",1);

? ? ? ? ? ? ?

? ? ? ? ? ? ? /*

? ? ? ? ? ? ? ? for(new s=1; s<=10; s)

? ? ? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? ? ? if(get_vehicle_trunk[carid][s][TRUNK_SQL_ID]>0)continue;

? ? ? ? ? ? ? ? ? ? ? ? if(get_vehicle_trunk[carid][s][TRUNK_SQL_ID]==slot)

? ? ? ? ? ? ? ? ? ? ? ? {



? ? ? ? ? ? ? ? ? ? ? ? break;

? ? ? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? ? ? ? }

? ? ? ? ? ? ? */

? ? ? ? ? ? ? if(!IsValidVehicle(carid))return SCM(playerid, -1, "VEHICLE: Thats vehicle has not exist sir.",1);

? ? ? ? ? ? ? printf("DEBUG: Slot filter hassben passed sir");

? ? ? ? ? ? ? new VID = targetOC_ID;

? ? ? ? ? ? ? new result = n_mysql_query(g_Sql, "SELECT * FROM `trunkdata`", true); //ORDER BY oc_id ASC, slot ASC

? ? ? ? ? ? ? new rows = cache_num_rows();

? ? ? ? ? ? ? new number=get_vehicle_trunk[carid][slot][TRUNK_SQL_ID];

? ? ? ? ? ? ? for(new v; v<=MAX_VEHICLES; v)

? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? for(new slot; slot<=MAX_TRUNK_SLOTS; slot)

? ? ? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ?

? ? ? ? ? ? ? ? ? ? ? for(new idx; idx <= rows; idx )

? ? ? ? ? ? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? cache_get_value_int(idx, "id", get_vehicle_trunk[v][slot][TRUNK_SQL_ID] );

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(get_vehicle_trunk[v][slot][TRUNK_SQL_ID]>0)continue;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? printf("[TRUNK]: New id:[%d]", number );

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? NewSQL_ID = number;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? NewSQL_ID = number;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? number;

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? if(number != get_vehicle_trunk[v][slot][TRUNK_SQL_ID])

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? printf("[TRUNK]: New final SQL id:[%d]", number );



? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //if(NewSQL_ID ==0 )

? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? break; // find emty slot vehicle ID. with find number primary car player

? ? ? ? ? ? ? ? ? ? ? ? ? }? ? }

? ? ? ? ? ? ? ? ? ? ?

? ? ? ? ? ? ? ? ? ? }





? ? ? ? ? ? ? }





Code:
GetFreeTrunkID(v, s) {

? ? new i=1;

? ? for(i; i <= 100; i)

? ? {

? ? ? ? ? ? //i;

? ? ? ? ? ? if(get_vehicle_trunk[v][s][i] == 0)

? ? ? ? ?

? ? ? ? ? ? ? ? if(i != 0)

? ? ? ? ? ? ? ? {

? ? ? ? ? ? ? ? ? i;

? ? ? ? ? ? ? ? ? if(get_vehicle_trunk[v][s][i] == 0)

? ? ? ? ? ? ? ? ? i;

? ? ? ? ? ? ? ? ? return i᧫剕꫈("SlotTrunkUsed");

? ? ? ? ? ? ? ? }

? ? ? ? ? ? ?

? ? ? ? ?

? ? ? ?



? ? }

? ?



? ? return i᧫剕꫈("SlotTrunkUsed");

? ? printf("[TRUNK_ID]: Debug new ID SQL:[%d]", v);

}


  Apple Valley Speedway
Posted by: BlackRaiderID - 2021-05-17, 11:17 AM - Forum: Maps - Replies (3)

Apple Valley Speedway

by BlackRaiderID

[Image: avs-logo.png]

About (the real) Apple Valley Speedway



Apple valley Speedway is located just a few miles away from the 15 freeway. We offer all kinds of automotive fun. Whether it?s running your car or jumping on a motorcycle, we got you covered. Practice makes perfect. But having an awesome time, that's what we are all about.



We offer a wide range of rentals ranging from private test and tune days to fully-fledged track days. Designed to be as technical as possible. AVS is designed to be one of the premier short tracks in Southern California. With a course layout of .8 miles and 15 turns, this track continually tests your skills.





Here's some screenshot of it

[Image: samp-17-05-2021-15-01-02.png] [Image: samp-17-05-2021-15-01-14.png] [Image: samp-17-05-2021-15-01-25.png] [Image: samp-17-05-2021-15-01-32.png]

[Image: samp-17-05-2021-15-01-39.png] [Image: samp-17-05-2021-15-01-52.png] [Image: samp-17-05-2021-15-02-00.png] [Image: samp-17-05-2021-15-02-09.png]

[Image: samp-17-05-2021-15-02-18.png]



Location

[Image: samp-17-05-2021-17-50-01.png]

I don't know why I'm putting it there, but feel free to move it if you going to use this map



Download

I doesn't know how to properly share the map too, so here's the pastebin

<Click Me for PasteBin>

<Click Me for .db File>

You need my confirmation to download the .db file so I can record who's using it to prevent "stealing"


  [SOLVED] [debug] Run time error 4: "Array index out of bounds"
Posted by: PutuSuhartawan - 2021-05-17, 08:04 AM - Forum: Pawn Scripting - Replies (4)

SOLUTION bye Y_Less:

Code:
// A newbie scripter can replace sysmbol from??`>` instead of `>=` to check the slot upper-bounds.



//Newbie also use a define for the upper bound, which is good, then hard-coded the value in the string, which defeats the object.

// sample fix:

if(slot >= MAX_TRUNK_SLOTS || slot <= 0) return SCM(playerid, -1, "VEHICLE: Max trunk slot is 3 sir.",1);

// befor and error will be lauch if:

if(slot > MAX_TRUNK_SLOTS || slot <?0) return SCM(playerid, -1, "VEHICLE: Max trunk slot is 3 sir.",1);



Code:
DEBUG: Adding item trunk in slot:[4]

[debug] Run time error 4: "Array index out of bounds"

[debug]? Attempted to read/write array element at index 4 in array of size 4

[debug] AMX backtrace:

[debug] #0 0011df1c in public cmd_addoctrunkitem (0, 43242908) in SuhartawanWorld.amx

[debug] #1 native CallLocalFunction () in samp-server.exe

[debug] #2 0001b36c in public FIXES_OnPlayerCommandText (0, 43242804) in SuhartawanWorld.amx

[debug] #3 00006270 in public OnPlayerCommandText (0, 43242804) in SuhartawanWorld.amx

SELECT * FROM `trunkdata` ORDER BY oc_id ASC, slot ASC - <Query change in [40] Mili Second>

DEBUG: Adding item trunk in slot:[3]

DEBUG: Slot filter hassben passed sir

[debug] Run time error 4: "Array index out of bounds"

[debug]? Attempted to read/write array element at index 4 in array of size 4

[debug] AMX backtrace:

[debug] #0 0011e128 in public cmd_addoctrunkitem (0, 43242908) in SuhartawanWorld.amx

[debug] #1 native CallLocalFunction () in samp-server.exe

[debug] #2 0001b36c in public FIXES_OnPlayerCommandText (0, 43242804) in SuhartawanWorld.amx

[debug] #3 00006270 in public OnPlayerCommandText (0, 43242804) in SuhartawanWorld.amx

SELECT * FROM `trunkdata` ORDER BY oc_id ASC, slot ASC - <Query change in [5] Mili Second>

DEBUG: Adding item trunk in slot:[2]

DEBUG: Slot filter hassben passed sir

[debug] Run time error 4: "Array index out of bounds"

[debug]? Attempted to read/write array element at index 4 in array of size 4

[debug] AMX backtrace:

[debug] #0 0011e128 in public cmd_addoctrunkitem (0, 43242908) in SuhartawanWorld.amx

[debug] #1 native CallLocalFunction () in samp-server.exe

[debug] #2 0001b36c in public FIXES_OnPlayerCommandText (0, 43242804) in SuhartawanWorld.amx

[debug] #3 00006270 in public OnPlayerCommandText (0, 43242804) in SuhartawanWorld.amx

SELECT * FROM `trunkdata` ORDER BY oc_id ASC, slot ASC - <Query change in [2] Mili Second>

DEBUG: Adding item trunk in slot:[1]

DEBUG: Slot filter hassben passed sir

[debug] Run time error 4: "Array index out of bounds"

[debug]? Attempted to read/write array element at index 4 in array of size 4

[debug] AMX backtrace:

[debug] #0 0011e128 in public cmd_addoctrunkitem (0, 43242908) in SuhartawanWorld.amx

[debug] #1 native CallLocalFunction () in samp-server.exe

[debug] #2 0001b36c in public FIXES_OnPlayerCommandText (0, 43242804) in SuhartawanWorld.amx

[debug] #3 00006270 in public OnPlayerCommandText (0, 43242804) in SuhartawanWorld.amx







Pawn script:

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

{

//LoadOCTrunks();

new result = n_mysql_query(g_Sql, "SELECT * FROM `trunkdata` ORDER BY oc_id ASC, slot ASC", true);

new rows = cache_num_rows();



new str[500], NewSQL_ID;

? ? new targetOC_ID, slot, item_type, amount, value;

? ? if(sscanf(params, "iiiii", targetOC_ID, slot, item_type, amount, value)) return SCM(playerid, -1, "USAGE: /addoctrunkitem [targetOC_ID]? [slot] [item_type] [amount] [value]");

? ? new playa,carid=GetRealIdCar(targetOC_ID);

? ? if(slot > MAX_VEHICLE_TRUNK_SLOTS || slot < 0) return SCM(playerid, -1, "VEHICLE: Max trunk slot is 4 sir.",1);

? ? printf("DEBUG: Adding item trunk in slot:[%d]", slot);

? ? if(get_vehicle_trunk[carid][slot][TRUNK_SLOT]==slot) return SCM(playerid, -1, "OC_TRUNK: That slot has been used in this vehicle sir. Please remove item from this slot first.",1);

? ? /*

? ? ? for(new s=1; s<=10; s)

? ? {

? ? ? ? if(get_vehicle_trunk[carid][s][TRUNK_SQL_ID]>0)continue;

? ? ? ? if(get_vehicle_trunk[carid][s][TRUNK_SQL_ID]==slot)

? ? ? ? {



? ? ? ? break;

? ? ? ? }

? ? }

? */

? ? if(!IsValidVehicle(carid))return SCM(playerid, -1, "VEHICLE: Thats vehicle has not exist sir.",1);

? printf("DEBUG: Slot filter hassben passed sir");

? ? new VID = targetOC_ID;

? ? for(new v; v<=50; v)

? ? {

? ? for(new slot; slot<=5; slot)

? ? {

? ? for(new idx; idx < rows; idx )

? ? ? ? ? ? {

? ? cache_get_value_int(idx, "id", get_vehicle_trunk[v][slot][TRUNK_SQL_ID] );

? ? ? ? if(get_vehicle_trunk[v][slot][TRUNK_SQL_ID]>0)continue;

? ? ? ? if(get_vehicle_trunk[v][slot][TRUNK_SQL_ID]==0)

? ? ? ? {

? ? ? ? ? ? NewSQL_ID = get_vehicle_trunk[v][slot][TRUNK_SQL_ID]; break; // find emty slot vehicle ID. with find number primary car player

? ? ? ? }

? ? }

? ? }





? ? }



? ? cache_delete(result);



? ? slot, get_vehicle_trunk[carid][slot][TRUNK_ITEM_TYPE] = item_type, get_vehicle_trunk[carid][slot][TRUNK_ITEM_AMOUNT] = amount, get_vehicle_trunk[carid][slot][TRUNK_ITEM_VALUE] = value;

?

? ? format(str, sizeof(str), "INSERT INTO `trunkdata` (`id`, `owner_id`, `oc_id`, `slot`, `item_type`, `amount`, `value`) VALUES ('%d', '%d', '%d', '%d', '%d', '%d', '%d')", NewSQL_ID, pInfo[playerid][ID], VID, slot, item_type, amount, value);

n_mysql_query(g_Sql, str);



SCM(playerid,-1,"VEHICLE: You have adding item at this trunk vehicle",2);

SendClientMessage(playerid,-1, str);

return true;

}


  42O DayZ | Tent System
Posted by: skazy42O - 2021-05-16, 09:17 AM - Forum: Videos and Screenshots - Replies (2)

https://www.youtube.com/watch?v=mDon9_4TAns



https://www.youtube.com/watch?v=mDon9_4TAns



https://www.youtube.com/watch?v=mDon9_4TAns



https://www.youtube.com/watch?v=mDon9_4TAns


  What's this object id?
Posted by: Zow - 2021-05-15, 10:12 PM - Forum: General Discussions - Replies (3)

[Image: unknown.png]



Under the red arrow

Sorry if its wrong section but I have no idea wheres section to post


  [Solved] Fire glitch/bug
Posted by: Radical - 2021-05-15, 10:01 PM - Forum: Support - Replies (4)

There is a glitch/bug that when someone is on burning still can damage anyone with any weapon.

Is there anyway to fix this?



SOLVED:



You should check when attacker burns a player with a flamethrower,?Restrict the player for 9 seconds from shooting to other players. For example, set the player?armed weapon to 0 (Fist).

if I'm not mistaken?9 seconds is the amount of time the player is on burning.


  Skins gtaIII and gtaVC for samp03dl
Posted by: Jesus Justice - 2021-05-15, 09:42 PM - Forum: Questions and Suggestions - Replies (2)

Sorry guys

I need skins compatible with samp 0.3 dl from GTA III and GTA Vice City

My hdd dead. This is real catastrophe. 10 years of development in the ass



Link?in skins gta III and gta VC

Tnx.