Help converting OnPlayerPickUpDynamicPickup to OnPlayerKeyStateChange
#2

Very basic example:

PHP код:
public OnPlayerKeyStateChange playeridnewkeysoldkeys ) {
    if ( 
newkeys KEY_SECONDARY_ATTACK ) {
    
        
// Change the three 00.00's to your entrance point's coordinates
        
if ( IsPlayerInRangeOfPoint playerid5.000.0000.0000.00 ) ) {
        
            
// SetPlayerPos ...
            // etc etc
        
}
        
        
// Change these 00.00's to your exit point's coordinates ...
        
else if ( IsPlayerInRangeOfPoint playerid5.000.0000.0000.00 ) ) {
            
// SetPlayerPos ...
            // etc etc
        
}
        
    }
    return 
true ;

https://sampwiki.blast.hk/wiki/Keys
https://sampwiki.blast.hk/wiki/OnPlayerKeyStateChange
https://sampwiki.blast.hk/wiki/IsPlayerInRangeOfPoint
Reply


Messages In This Thread
Help converting OnPlayerPickUpDynamicPickup to OnPlayerKeyStateChange - by FunnyBear - 04.04.2016, 12:42
Re: Help converting OnPlayerPickUpDynamicPickup to OnPlayerKeyStateChange - by Dignity - 04.04.2016, 13:17
Re: Help converting OnPlayerPickUpDynamicPickup to OnPlayerKeyStateChange - by FunnyBear - 04.04.2016, 13:20

Forum Jump:


Users browsing this thread: 1 Guest(s)