Welcome, Guest |
You have to register before you can post on our site.
|
Online Users |
There are currently 253 online users. » 0 Member(s) | 250 Guest(s) Google, Bing, Yandex
|
Latest Threads |
I know Kalcor left the bu...
Forum: Questions and Suggestions
Last Post: NoxxeR
3 hours ago
» Replies: 4
» Views: 92
|
Desolation Roleplay
Forum: Gamemodes
Last Post: Nikore
11 hours ago
» Replies: 2
» Views: 4,528
|
Battlefields - TDM (Team ...
Forum: Gamemodes
Last Post: Nikore
Today, 04:14 AM
» Replies: 3
» Views: 2,779
|
Will there be a higher pl...
Forum: General Discussions
Last Post: Armeat2005
Yesterday, 08:40 AM
» Replies: 0
» Views: 27
|
DOF2.1 (DOF2 Updated)
Forum: Libraries
Last Post: GracieStith
Yesterday, 04:51 AM
» Replies: 1
» Views: 865
|
Kontak Layanan CIMB Niaga...
Forum: Support
Last Post: bosquee9053
2025-04-20, 03:44 PM
» Replies: 0
» Views: 25
|
CS Bank DBS Customer Cent...
Forum: Chat
Last Post: bosquee9053
2025-04-20, 03:37 PM
» Replies: 0
» Views: 34
|
Sponsors and Donations
Forum: Questions and Suggestions
Last Post: NoxxeR
2025-04-20, 05:48 AM
» Replies: 0
» Views: 43
|
Best practices for conver...
Forum: Tech
Last Post: Mido
2025-04-19, 09:53 PM
» Replies: 1
» Views: 98
|
A simple suggestion as a ...
Forum: Questions and Suggestions
Last Post: Mido
2025-04-19, 09:47 PM
» Replies: 1
» Views: 46
|
|
|
[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
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
Location
I don't know why I'm putting it there, but feel free to move it if you going to use this map
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;
}
|
|
|
[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.
|
|
|
Crazybobs Cops and Robbers |
Posted by: HugsForDrugs - 2021-05-15, 07:12 PM - Forum: General Discussions
- Replies (4)
|
 |
Crazybobs CnR is undoubtedly one of the most popular servers in SAMP however this is now changing and there are many different reasons for this which I will mention below. Also if you don't want to read then scroll down to the bottom where you can find a 36 minute video which explains everything in detail.
1) The owner of the servers, crazybob has abandoned the whole project. Even though he never officially mentioned this, he was last seen online somewhere in 2017. All attempts to contact him seems to go in vain and servers no longer receive any form of updates. Not even an update for Halloween or Christmas.
2) This server was known for having the best anti-cheat system amongst SAMP servers but this is no longer true. There are now a few groups with the sole purpose of cheating and they seem to be online almost all the time. One such group is "snipergang".
[Video: https://youtu.be/ftutS7sp7kI]
[Video: https://youtu.be/qAx79pZ7lsE]
Some of the things they are able to do is :
- Block admins and players from joining the servers.
- Tamper with the anti-cheat system to ban admins and normal players.
- Fly around the whole map while being invisible and kill players.
- Teleport vehicles into players and killing them instantly.
- And a lot more.
3) With no owner to moderate the actions of the staff team, admin abuse has drastically increased and this caused many players to leave the community. There are many such cases of admins abusing players but obviously I can't mention all so here is one. Recently a player was approached by 2 admins and was told to sell his in-game house for $100,000 which is the cheapest amount you can sell for. The player refused to do so and the admins proceeded to kill him over and over. They even fined all his money which eventually put him in debt. All because he refused to sell his house which he bought himself for him and his friends.
[Video: https://youtu.be/psXaLQLce7w]
In this video above you can see a player named "money". That is actually an account with admin status which a player bought from the admin. So yeah, someone else was using an admin account. That's the condition of this server now. If you want to know more about this visit the link below. This was written by the player who bought the admin account after he was caught and this should answer any questions you have.
https://pastebin.com/gGsuciabhe
I guess all these points I mentioned above is enough for you to get an idea of how bad crazybobs community has turned out to be.
Anyway, here is the video which explains everything. It is long but you won't regret watching it.
[Video: https://youtu.be/fx-tr9zSXIQ]
|
|
|
[SOLVED] How fix warning 217: loose indentation without Pragma Syntax? |
Posted by: PutuSuhartawan - 2021-05-15, 11:24 AM - Forum: Pawn Scripting
- Replies (2)
|
 |
SOLUTION from:
(2021-05-15, 03:26 PM)AbyssMorgan Wrote: Example of 217 warning
Code: stock my_function(arg1,arg2){
new something = random(25);
something = arg1 * arg2; //warning loose indentation due to missing tab
return something;
}
stock my_function(arg1,arg2)
{
new something = random(25);
something = arg1 * arg2; //warning loose indentation due to missing tab
return something;
}
Proof title better than problem description :
That means the newbie?code is bad.? Hiding issues doesn't solve them, it just means a newbie ignoring the bugs.
In the mind, i just need to remove the upper tab size from the script margin. But i don't know actually the great for solved all about the warning in pawn compiler?
Sir do you have a pack of module how to fix all of the warnings in the pawn compiler? Please share the module of all warnings is very important to solved the warning.
|
|
|
|