SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 05/10/2010, 07:10 AM   #1
Haydz
Gangsta
 
Haydz's Avatar
 
Join Date: Jul 2010
Location: New Zealand
Posts: 752
Reputation: 44
Default How can i..

Once a player enters the checkpoint, how can i make him freeze for around 5 seconds

i know i need a timer but don't know how to put it in.

Code:
TogglePlayerControllable(playerid, 0);
(timerstuff)        
TogglePlayerControllable(playerid, 1);
not sure if thats correct but thats as fair i got using the wiki.

any help would be appreciated
Haydz is offline  
Old 05/10/2010, 07:16 AM   #2
CrucixTM
Huge Clucker
 
CrucixTM's Avatar
 
Join Date: Jan 2010
Location: Denmark
Posts: 293
Reputation: 7
Default Re: How can i..

pawn Code:
SetTimerEx("freezetimer", 5000, 0, "%d", playerid); // Set the timer where needed

public freezetimer(playerid) // In the bottom of the script. This will simply unfreeze the player after 5 seconds.
{
    TogglePlayerControllable(playerid, 1);
}
CrucixTM is offline  
Old 05/10/2010, 07:31 AM   #3
willsuckformoney
High-roller
 
willsuckformoney's Avatar
 
Join Date: Dec 2009
Posts: 1,492
Reputation: 65
Default Re: How can i..

Make sure you

pawn Code:
forward freezetimer(playerid); // Make sure you has that
public freezetimer(playerid) // In the bottom of the script. This will simply unfreeze the player after 5 seconds.
{
    TogglePlayerControllable(playerid, 1);
}
__________________
Fuck the system.
willsuckformoney is offline  
Old 05/10/2010, 08:23 AM   #4
CrucixTM
Huge Clucker
 
CrucixTM's Avatar
 
Join Date: Jan 2010
Location: Denmark
Posts: 293
Reputation: 7
Default Re: How can i..

Oh yes, my bad.
CrucixTM is offline  
Old 05/10/2010, 09:03 AM   #5
Haydz
Gangsta
 
Haydz's Avatar
 
Join Date: Jul 2010
Location: New Zealand
Posts: 752
Reputation: 44
Default Re: How can i..

sweet that works, thanks alot man.
Haydz is offline  
 

Thread Tools
Display Modes

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



All times are GMT. The time now is 05:59 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.