Help Scripting
#1

Hello guys,I made an script when you join passenger,you can change your weapons to g-shoot.
But I want to disable from using some weapons in gshoot like deagle cuz it rapid fires!
Can I get some help?

Code:
	else if(newstate == PLAYER_STATE_PASSENGER)
	{
	    new weapID = GetPlayerWeapon(playerid);
		SetPVarInt(playerid, "switch_WeaponID", weapID);
		if(IsBulletWeapon(weapID)) SendClientMessage(playerid, COLOR_JEFE, "[IncredibleRP] {FFFFFF}You can switch weapons using ~k~~CONVERSATION_YES~ / ~k~~CONVERSATION_NO~.");
	    new driverid = GetVehicleDriver(GetPlayerVehicleID(playerid));
Code:
     	switch(GetPlayerWeapon(playerid))
     	{
     	    case 34:
     	        SetPlayerArmedWeapon(playerid, GetScriptWeapon(playerid));
	        default:
				SetPlayerArmedWeapon(playerid, 0);
		}
Reply
#2

PHP Code:
/* MADE BY BRAUF */
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_PASSENGER// if passenger state is = passenger
    
{
        if(
GetPlayerWeapon(playerid) == WEAPON_DEAGLE// if player's weapon is a desert eagle
        
{
            
SetPlayerArmedWeapon(playerid0); // set the weapon to a fist
        
}
    }
    return 
1;

Reply
#3

thanks <3
Reply
#4

Quote:
Originally Posted by brauf
View Post
PHP Code:
/* MADE BY BRAUF */
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_PASSENGER// if passenger state is = passenger
    
{
        if(
GetPlayerWeapon(playerid) == WEAPON_DEAGLE// if player's weapon is a desert eagle
        
{
            
SetPlayerArmedWeapon(playerid0); // set the weapon to a fist
        
}
    }
    return 
1;

Can you read pms?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)