Drive-By with all guns.. (How can i disable it?) - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Drive-By with all guns.. (How can i disable it?) (
/showthread.php?tid=198484)
Drive-By with all guns.. (How can i disable it?) -
nescha - 12.12.2010
Hello,
how can i disable the Drive-By function with all guns? I mean, you can shot with a deagle or a sniper from a bice as a passenger...
how can i disable it in my script?
best regards and sorry for my bad english,
nescha
Re: Drive-By with all guns.. (How can i disable it?) -
Jochemd - 12.12.2010
You can make a script that when a player is holding it it switches to another weapon
Re: Drive-By with all guns.. (How can i disable it?) -
nescha - 12.12.2010
Yes, but how can i put this in my script? On other servers it was deactivated to, I have no idea how I could disable it...
Re: Drive-By with all guns.. (How can i disable it?) -
Riddick94 - 12.12.2010
Код:
if(GetPlayerWeapon(playerid) == WEAPON_SNIPER)SetPlayerArmedWeapon(playerid, 0);
i think it should work ;d
Re: Drive-By with all guns.. (How can i disable it?) -
nescha - 12.12.2010
And where must i place this code? How can i find out the names of a gun like deagle? (WEAPON_DEAGLE?)
lg
Re: Drive-By with all guns.. (How can i disable it?) -
Jochemd - 12.12.2010
In a timer, which gets set when a player enters a vehicle as passenger.
You can find them in a_samp.inc :P
Re: Drive-By with all guns.. (How can i disable it?) -
Riddick94 - 12.12.2010
Em.. OnPlayerStateChange.
Код:
if(newstate == PLAYER_STATE_PASSENGER && oldstate == PLAYER_STATE_ONFOOT)
{
if(GetPlayerWeapon(playerid) == WEAPON_SNIPER)SetPlayerArmedWeapon(playerid, 0);
}
Re: Drive-By with all guns.. (How can i disable it?) -
nescha - 12.12.2010
If the server is not very burdensome when i use this with all weapons? oO
Re: Drive-By with all guns.. (How can i disable it?) -
Sergei - 12.12.2010
Why
Quote:
if(newstate == PLAYER_STATE_PASSENGER && oldstate == PLAYER_STATE_ONFOOT)
|
So if player is put in the vehicle by server, he should be able to drive-by with dealge?
Re: Drive-By with all guns.. (How can i disable it?) -
Riddick94 - 12.12.2010
Quote:
Originally Posted by Sergei
Why
So if player is put in the vehicle by server, he should be able to drive-by with dealge?
|
It's getting oldstate FOOT without else states.. i think it's good.