SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 19/04/2017, 12:14 AM   #1
JR_Junior
Huge Clucker
 
Join Date: Nov 2011
Location: Brazil
Posts: 226
Reputation: 54
Default New cheat?

Hello!
It looks like it's a type of cheat that says it's coming out of an invalid vehicle.
Did I solve this with the code below?
PHP Code:
public OnPlayerExitVehicle(playeridvehicleid)
{
   if(
IsValidVehicle(vehicleid) || vehicleid >= MAX_VEHICLES) return Kick(playerid);

[debug] Run time error 4: "Array index out of bounds"
[16:03:42] [debug] Accessing element at index 2000 past array upper bound 1999
[16:03:42] [debug] AMX backtrace:
[16:03:42] [debug] #0 00149d74 in public OnPlayerExitVehicle (4, 2000) from GM.amx
[16:03:42] [debug] Run time error 4: "Array index out of bounds"
[16:03:42] [debug] Accessing element at index 2001 past array upper bound 1999
[16:03:42] [debug] AMX backtrace:
[16:03:42] [debug] #0 00149d74 in public OnPlayerExitVehicle (4, 2001) from GM.amx
[16:03:42] [debug] Run time error 4: "Array index out of bounds"
[16:03:42] [debug] Accessing element at index 2002 past array upper bound 1999
[16:03:42] [debug] AMX backtrace:
[16:03:42] [debug] #0 00149d74 in public OnPlayerExitVehicle (4, 2002) from GM.amx
[16:03:42] [debug] Run time error 4: "Array index out of bounds"
[16:03:42] [debug] Accessing element at index 2003 past array upper bound 1999
[16:03:42] [debug] AMX backtrace:
[16:03:42] [debug] #0 00149d74 in public OnPlayerExitVehicle (4, 2003) from GM.amx
[16:03:42] [debug] Run time error 4: "Array index out of bounds"
[16:03:42] [debug] Accessing element at index 2004 past array upper bound 1999
...
__________________
"You can disrespect peoples work, but then don't be surprised when they go away." - Kalcor
JR_Junior is offline   Reply With Quote
Old 19/04/2017, 12:40 AM   #2
ISmokezU
Gangsta
 
Join Date: Aug 2016
Posts: 542
Reputation: 75
Default Re: New cheat?

Idk but why are you checking if it's equal to MAX_VEHICLES? Just check if it's a valid vehicle.

Code:
public OnPlayerExitVehicle(playerid, vehicleid) 
{ 
   if(!IsValidVehicle(vehicleid) Kick(playerid); 
   printf("Vehicle ID: %i", vehicleid);
}
ISmokezU is offline   Reply With Quote
Old 19/04/2017, 12:48 AM   #3
JR_Junior
Huge Clucker
 
Join Date: Nov 2011
Location: Brazil
Posts: 226
Reputation: 54
Default Re: New cheat?

Quote:
Originally Posted by ISmokezU View Post
Idk but why are you checking if it's equal to MAX_VEHICLES? Just check if it's a valid vehicle.

Code:
public OnPlayerExitVehicle(playerid, vehicleid) 
{ 
   if(!IsValidVehicle(vehicleid) Kick(playerid); 
   printf("Vehicle ID: %i", vehicleid);
}
Ok! Thanks!
__________________
"You can disrespect peoples work, but then don't be surprised when they go away." - Kalcor
JR_Junior is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
help me about making anty cheat wich knows how to make anty cheat pls dont leave me unanswear and help me gogliko Scripting Help 3 06/08/2013 08:38 PM


All times are GMT. The time now is 04:41 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.