Run & Shoot Problem
#1

Well...

Its wierd but my charachter on my gamemode can run and shoot, not like I saw on some servers that when you aim that you can only move slower like "alt mode"

here i cant really run and shoot

Код:
	SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 0);
is already in script


& how to make that charachter holds with both hands ALL WEAPONS
Reply
#2

I found this, similar to your problem.
https://sampforum.blast.hk/showthread.php?tid=345115

Quote:
Originally Posted by ******
Посмотреть сообщение
Remove "UsePlayerPedAnims(0)" from your mode.
Try what ****** said
Reply
#3

doesn't work and my running is bad now...

Btw. Its like i want when im Crouch .. but still standing mode is bad... still runing and shooting
Reply
#4

Your char runs like cj and hold the weapons like cj too right?
That is caused by UsePlayerPedAnims
try adding UsePlayerPedAnims();
Reply
#5

but when i remove UsePlayerPedAnims , he is running like CJ but shooting same...

Shooting stay same with UsePlayerPedAnims and without UsePlayerPedAnims
Reply
#6

Код:
public OnPlayerUpdate(playerid)
{
        if(GetPVarInt(playerid, "laser") == 1)
		{
			RemovePlayerAttachedObject(playerid, 3);
     		if ((IsPlayerInAnyVehicle(playerid)) || (IsPlayerInWater(playerid))) return 1;
       		switch (GetPlayerWeapon(playerid))
			{
   				case 23:
		    	{
       				if (IsPlayerAiming(playerid))
			    	{
        				if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
		 				{
       						SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // SP standing aiming
             				0.108249, 0.030232, 0.118051, 1.468254, 350.512573, 364.284240);
              			}
					  	else
					   	{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // SP crouched aiming
              				0.108249, 0.030232, 0.118051, 1.468254, 349.862579, 364.784240);
                  		}
                    }
					else
				 	{
      					if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
			   			{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // SP standing not aiming
              				0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
                  		}
	  					else
					   	{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // SP crouched not aiming
         					0.078248, 0.027239, 0.113051, -11.131746, 350.602722, 362.384216);
                        }
      				}
			  	}
				case 27:
			 	{
     				if (IsPlayerAiming(playerid))
  					{
       					if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
			    		{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // SPAS standing aiming
              				0.588246, -0.022766, 0.138052, -11.531745, 347.712585, 352.784271);
                  		}
					  	else
					   	{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // SPAS crouched aiming
              				0.588246, -0.022766, 0.138052, 1.468254, 350.712585, 352.784271);
                  		}
           			}
				   	else
				    {
        				if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
				 		{
       						SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // SPAS standing not aiming
             				0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
                 		}
				 		else
					  	{
        					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // SPAS crouched not aiming
        					0.563249, -0.01976, 0.134051, -11.131746, 351.602722, 351.384216);
                        }
					}
				}
				case 30:
			 	{
     				if (IsPlayerAiming(playerid))
				 	{
      					if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
				  		{
        					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // AK standing aiming
             				0.628249, -0.027766, 0.078052, -6.621746, 352.552642, 355.084289);
                 		}
					 	else
					  	{
        					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // AK crouched aiming
             				0.628249, -0.027766, 0.078052, -1.621746, 356.202667, 355.084289);
                 		}
                   	}
				   	else
			    	{
        				if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
					 	{
       						SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // AK standing not aiming
             				0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
                 		}
					 	else
					  	{
        					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // AK crouched not aiming
             				0.663249, -0.02976, 0.080051, -11.131746, 358.302734, 353.384216);
                        }
					}
				}
				case 31:
			 	{
     				if (IsPlayerAiming(playerid))
			  		{
       					if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
				   		{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // M4 standing aiming
              				0.528249, -0.020266, 0.068052, -6.621746, 352.552642, 355.084289);
          				}
					  	else
					   	{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // M4 crouched aiming
              				0.528249, -0.020266, 0.068052, -1.621746, 356.202667, 355.084289);
               			}
                  	}
			  		else
				   	{
        				if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
				 		{
       						SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // M4 standing not aiming
             				0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
                 		}
				 		else
					  	{
        					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // M4 crouched not aiming
             				0.503249, -0.02376, 0.065051, -11.131746, 357.302734, 354.484222);
                        }
					}
				}
    			case 29:
			 	{
     				if (IsPlayerAiming(playerid))
			  		{
       					if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
			    		{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // MP5 standing aiming
   							0.298249, -0.02776, 0.158052, -11.631746, 359.302673, 357.584259);
          				}
					  	else
					   	{
         					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // MP5 crouched aiming
              				0.298249, -0.02776, 0.158052, 8.368253, 358.302673, 352.584259);
                  		}
                    }
					else
					{
    					if (GetPlayerSpecialAction(playerid) != SPECIAL_ACTION_DUCK)
				 		{
       						SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // MP5 standing not aiming
             				0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
                 		}
				 		else
					  	{
        					SetPlayerAttachedObject(playerid, 3, GetPVarInt(playerid, "color"), 6, // MP5 crouched not aiming
             				0.293249, -0.027759, 0.195051, -12.131746, 354.302734, 352.484222);
                        }
					}
				}
			}
		}
        return 1;
}
Код:
IsPlayerAiming(playerid)
{
	new anim = GetPlayerAnimationIndex(playerid);
	if (((anim >= 1160) && (anim <= 1163)) || (anim == 1167) || (anim == 1365) || (anim == 1643) || (anim == 1453) || (anim == 220)) return 1;
 	return 0;
}
Reply
#7

Read this
https://sampwiki.blast.hk/wiki/SetPlayerSkillLevel
and this
https://sampwiki.blast.hk/wiki/Skillweapons

This is needed in order to get the weapons in both hands.

Код:
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
    // This will make the player use single-handed sawn-off shotguns.
Reply
#8

please read this: http://forum.sa-mp.com/showpost.php?...21&postcount=1
Reply
#9

Quote:
Originally Posted by tbedy
Посмотреть сообщение
I told you, read the sa-mp page's.
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 0); 0 is basicly the default value.

try
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 999);


And you know that is for Desert Eagle right?

SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 999);
Reply
#10

Tried that too...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)