Drive-By with all guns.. (How can i disable it?)
#1

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
Reply
#2

You can make a script that when a player is holding it it switches to another weapon
Reply
#3

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...
Reply
#4

Код:
if(GetPlayerWeapon(playerid) == WEAPON_SNIPER)SetPlayerArmedWeapon(playerid, 0);
i think it should work ;d
Reply
#5

And where must i place this code? How can i find out the names of a gun like deagle? (WEAPON_DEAGLE?)

lg
Reply
#6

In a timer, which gets set when a player enters a vehicle as passenger.

You can find them in a_samp.inc :P
Reply
#7

Em.. OnPlayerStateChange.

Код:
if(newstate == PLAYER_STATE_PASSENGER && oldstate == PLAYER_STATE_ONFOOT)
{
if(GetPlayerWeapon(playerid) == WEAPON_SNIPER)SetPlayerArmedWeapon(playerid, 0);
}
Reply
#8

If the server is not very burdensome when i use this with all weapons? oO
Reply
#9

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?
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)