Raised This Month: $ Target: $400
 0% 

Multiple Triggers on pTouched


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 03-28-2017 , 07:22   Re: Multiple Triggers on pTouched
Reply With Quote #2

Try to check oldorigin of the player for touching with this trigger, if it doesn't touch the trigger then you can print this message.
Or you can check if player touched this trigger in previous frame:
PHP Code:
new bool:g_touchedPrevFrame[MAX_PLAYERS 1];
new 
bool:g_touchedThisFrame;

public 
client_putinserver(player) {
    
g_touchedPrevFrame[player] = false;
}

public 
client_PreThink(player) {
    
g_touchedThisFrame false;
}

public 
client_PostThink(player) {
    
g_touchedPrevFrame[player] = g_touchedThisFrame;
}

public 
Message(touchedtoucher
{
    
g_touchedThisFrame true;
    if (
g_touchedPrevFrame[toucher])
        return;
    
client_print(toucherprint_chat"TEst test test"); // testing

__________________

Last edited by PRoSToTeM@; 03-28-2017 at 11:13.
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 17:59.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode