14.05.2014, 03:01
Hello this first tutorial
What is can do?:
This can stop player shooting on vehicles.
or
You can use this to stop player shooting on vehicle in your gamemode!
What is can do?:
This can stop player shooting on vehicles.
Код:
public OnPlayerStateChange(playerid, newstate, oldstate) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(GetPlayerWeapon(playerid) != 29) // MP5 { SetPlayerArmedWeapon(playerid, 0); } } return 1; }
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if(newkeys & KEY_FIRE) { if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { if(GetPlayerWeapon(playerid) == 29 ) { SetPlayerArmedWeapon(playerid, 0); } } } return 1; }