Help me please, it'd be appreciated - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help me please, it'd be appreciated (
/showthread.php?tid=251918)
Help me please, it'd be appreciated -
Andregood - 29.04.2011
I'm currently trying to make a timer for my command, but it doesn't seem to work, I've tried the two different ways I know of, settimer and settimerex, I either did something wrong or it doesn't work. Please help me out here thanks, it'd be appreciated.
Re: Help me please, it'd be appreciated -
Slash01 - 29.04.2011
Quote:
Originally Posted by Andregood
I'm currently trying to make a timer for my command, but it doesn't seem to work, I've tried the two different ways I know of, settimer and settimerex, I either did something wrong or it doesn't work. Please help me out here thanks, it'd be appreciated.
|
whats your code? we could work out the problem from there?
is it like a countdown command? or a total race time or something like that?
Re: Help me please, it'd be appreciated -
[DDC]Delight - 29.04.2011
Could you show us the example?
And maybe an explanation on what exactly you want to comply there
Re: Help me please, it'd be appreciated -
Andregood - 29.04.2011
Well I basically want a timer between each jump, that's pretty much it.
Код:
if(gTeam[playerid] == 2)
{
if(PRESSED(KEY_JUMP))
{
new Float:vx,Float:vy,Float:vz;
GetPlayerVelocity(playerid,vx,vy,vz);
SetPlayerVelocity(playerid,vx + 0.0,vy - 0.0 ,vz + 0.6);
}
}
return 1; ////////////////YOU KEEP FUCKING FORGETTING THIS
Re: Help me please, it'd be appreciated -
[DDC]Delight - 29.04.2011
Quote:
Originally Posted by Andregood
Well I basically want a timer between each jump, that's pretty much it.
Код:
return 1; ////////////////YOU KEEP FUCKING FORGETTING THIS
|
OFFTOPIC: Lol'd at the commented part xD
DO I get you wrong or do you want to create a timer to prevent bunnyhoppers?
Re: Help me please, it'd be appreciated -
Andregood - 29.04.2011
No, I want to create a timer between the jumps limiting them slightly as my team 2, which are vampires can jump significantly higher than normal humans but I need to put a limit per jump as they can literally fly in their current state when jumping. So I basically want to put a 3 seconds timer between each jump, limiting it.
Re: Help me please, it'd be appreciated -
Vince - 29.04.2011
Use GetTickCount.
pawn Код:
new Ticks[MAX_PLAYERS];
// In your command:
if((GetTickCount() - Ticks[playerid]) < 3000)
{
SendClientMessage(playerid, COLOR_RED, "Please wait before using this command again");
return 1;
}
Ticks[playerid] = GetTickCount();
// Your jump code goes here
Re: Help me please, it'd be appreciated -
Andregood - 29.04.2011
It works pretty much, except for the fact that whatever button I press I get spammed with that text basically.