Raised This Month: $ Target: $400
 0% 

Multiple Triggers on pTouched


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
blood2k
Senior Member
Join Date: Mar 2014
Old 03-28-2017 , 11:26   Re: Multiple Triggers on pTouched
Reply With Quote #3

Quote:
Originally Posted by PRoSToTeM@ View Post
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



Thank you very much sir!
blood2k is offline
 



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