bandana
#1

I have a question, have the sniper and the mask (bandana), my mask is in trouble when I aim with my sniper, the object "bandana", stands in front hindering the vision of the sniper rifle, I was wondering how to fix this.. oide someone help me? please..
Reply
#2

I think you can't. It will interrupt in sniping. In my opinion.
Reply
#3

This is not only your problem. It happens to everybody. Objects placed on your head, will show up on your telescope when aiming. There is an include called AOX which could help you fixing this issue. Its topic is here.
Reply
#4

Quote:
Originally Posted by Michael B
Посмотреть сообщение
This is not only your problem. It happens to everybody. Objects placed on your head, will show up on your telescope when aiming. There is an include called AOX which could help you fixing this issue. Its topic is here.

Hello, thank you, I'm doing it right? so will make the mistake of sniper?

PHP код:
public OnPlayerConnect(playerid)
{
    
ToggleRemoveNormAOWeaponZoom(playerid1);
    
ToggleRemoveAOWeaponZoom(playerid0);
    return 
1;
}
//My bandana created:
SetPlayerTempAttachedObject(playerid, -171916320.0770000.029000, -0.002000, -73.79988090.999992, -105.7999871.0159990.9990001.02000100); 
@edit

Quote:
Originally Posted by Corekt
Посмотреть сообщение
AOX
This include introduces Temporary Attached Objects, which are attached objects designed to be automatically removed after a certain time. An example usage of this would be attaching particle objects that disappear after a few seconds.

Usage

PHP код:
SetPlayerTempAttachedObject(playeridtimemodelidboneidFloat:fOffsetXFloat:fOffsetYFloat:fOffsetZFloat:fRotXFloat:fRotYFloat:fRotZFloat:fScaleXFloat:fScaleYFloat:fScaleZmaterialcolor1materialcolor2); 
Weapon Zoom Fix

If you've played on a server with attached objects, you may have noticed how when aiming with a Sniper, the objects sometimes obstruct your view. With this include, aiming with a Sniper, Rocket Launcher, Heat Seeker, or Camera will now remove temporary attached objects and restore them after you stop aiming. It will be noticeable by all players when your attached objects are removed. This feature is optional, and if you want you can disable it entirely with this function:

PHP код:
// Toggles the Weapon Zoom Fix on or off (1 or 0)
ToggleRemoveAOWeaponZoom(playeridtoggle);
// Example Usage
public OnPlayerConnect(playerid)
{
    
// Disable upon player connect
    
ToggleRemoveAOWeaponZoom(playerid0);
    return 
1;

Note that by default normal attached objects aren't removed when aiming with the aforementioned weapons. To enable the Weapon Zoom Fix for normal attached objects use this function:

PHP код:
// Toggles the Weapon Zoom Fix for normal attached objects on or off (1 or 0)
ToggleRemoveNormAOWeaponZoom(playeridtoggle);
// Example Usage
public OnPlayerConnect(playerid)
{
    
ToggleRemoveNormAOWeaponZoom(playerid1);
    return 
1;

Please help me, is very important to my Roleplay server, everybody's complaining much of hitmen.
Reply
#5

Up!
Reply
#6

Try to remove the mask on aim with sniper and set it back
Reply
#7

Simply tell them that its not your Server issue. It happens while snipering.
Reply
#8

PHP код:
#define HOLDING(%0) \
    
((newkeys & (%0)) == (%0))
    
if(
HOLDING(KEY_HANDBRAKE))
{
    
//Remove the bandana
}
else
{
    
//create the bandana again

You can remove the bandana if you holding the right mouse button and create it again if you don't press it.
I don't know if you have to use HOLDING or PRESSED.
Reply
#9

Quote:
Originally Posted by MarvinPWN
Посмотреть сообщение
PHP код:
#define HOLDING(%0) \
    
((newkeys & (%0)) == (%0))
    
if(
HOLDING(KEY_HANDBRAKE))
{
    
//Remove the bandana
}
else
{
    
//create the bandana again


You can remove the bandana if you holding the right mouse button and create it again if you don't press it.
I don't know if you have to use HOLDING or PRESSED.
Thank you! but you are in trouble, help me?

Код:
C:\Users\2\Desktop\gamemode\gamemodes\w.pwn(11750) : error 017: undefined symbol "newkeys"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Errors.
PHP код:
public OnPlayerUpdate(playerid)
{
        if (
HOLDING(KEY_HANDBRAKE)) RemovePlayerAttachedObject(playerid7); //error 017
        
else
        {
            
SetPlayerAttachedObject(playerid7, ......
        }

Reply
#10

You have to put this define into OnPlayerKeyStateChange.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)