[System] Protect Player Shoot on the cars for Roleplay
#1

OnPlayerStateChange

Код:
	if(newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER)
	{
		new Weap[2];
		GetPlayerWeaponData(playerid, 4, Weap[0], Weap[1]);
		SetPlayerArmedWeapon(playerid, Weap[0]);
       }
Player can't shoot on the cars
Reply
#2

PHP код:
if(oldstate == PLAYER_STATE_ONFOOT && newstate == PLAYER_STATE_DRIVER)//if the player enter's a veh.
    
{
        new 
Weap[2];
        
GetPlayerWeaponData(playerid4Weap[0], Weap[1]);
        
SetPlayerArmedWeapon(playeridWeap[0]);
       } 
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)