SA-MP Forums

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

Reply
 
Thread Tools Display Modes
Old 12/01/2015, 03:10 PM   #1
Cerealguy
Huge Clucker
 
Cerealguy's Avatar
 
Join Date: Mar 2013
Posts: 292
Reputation: 8
Default G abuse

Hi, friend , I could help or give an idea of how you could do that when a vehicle without a driver and this is a passenger in the passenger lay their weapons with 0 bullets or not generate any damage
__________________
My first filterscript
[FilterScript] Rooftop system SQlite
Cerealguy is offline   Reply With Quote
Old 12/01/2015, 03:28 PM   #2
rickisme
Huge Clucker
 
rickisme's Avatar
 
Join Date: Mar 2013
Location: Vietnam
Posts: 225
Reputation: 27
Default Re: G abuse

pawn Code:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
    if(IsPlayerInAnyVehicle(playerid))
    {
        new
            driver = INVALID_PLAYER_ID,
            vehid = GetPlayerVehicleID(playerid);
        for(new i; i < GetMaxPlayers(); i++)
        {
            if(GetPlayerVehicleID(i) == vehid && GetPlayerState(i) == PLAYER_STATE_DRIVER)
            {
                driver = i;
                break;
            }
        }
        if(driver == INVALID_PLAYER_ID && GetPlayerState(playerid) == PLAYER_STATE_PASSENGER) return 0;
    }
    return 1;
}
__________________

Sorry for my bad english.
  1. [FS] SoundCloud Music Player
  2. [VIDEO] Horse Betting System
rickisme is offline   Reply With Quote
Old 12/01/2015, 03:29 PM   #3
M4D
Huge Clucker
 
M4D's Avatar
 
Join Date: Oct 2014
Posts: 280
Reputation: 44
Default Re: G abuse

In OnPlayerWeaponShot check:
Player is in any vehicle ?
If yes, player state is passenger ? (GetPlayerState)
If yes, then check that vehicle id has driver ?
If no, remove him from vehicle
But i think this isn't good idea because it will make a loop between player for each shot
I saw an include on the forum for 'G Bug abuse'
Search it (i'm on my phone i can't search sorry)

EDIT: i was slow, the guy above me replied faster
Sorry
__________________
Work Hard In Silence. Let Your Success Make The Noise
M4D is offline   Reply With Quote
Old 12/01/2015, 03:40 PM   #4
Cerealguy
Huge Clucker
 
Cerealguy's Avatar
 
Join Date: Mar 2013
Posts: 292
Reputation: 8
Default Respuesta: G abuse

thanks for the help, if it was faster has also happened to me haha
__________________
My first filterscript
[FilterScript] Rooftop system SQlite
Cerealguy 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
abuse money KingPersona Scripting Help 6 04/10/2014 02:17 PM
Repair Abuse MBilal Scripting Help 12 30/09/2013 04:03 PM
[Help]Kinda abuse [CG]Milito Scripting Help 2 02/12/2012 02:49 AM
/handsup abuse killar456 Help Archive 2 13/05/2009 07:49 PM


All times are GMT. The time now is 04:04 AM.


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