SA-MP Forums Archive
Is This possible - 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: Is This possible (/showthread.php?tid=87575)



Is This possible - [top_Shoter] - 21.07.2009

is there a way to make if player leave a checkpoint or goes out side interior 0 that it can set a position i just need to no the function or what it would be the reset i can do

EDIT: ill try it with PlayerInArea first


Re: Is This possible - Correlli - 21.07.2009

https://sampwiki.blast.hk/wiki/OnPlayerLeaveCheckpoint
or
https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange


Re: Is This possible - [top_Shoter] - 21.07.2009

Fixed


Re: Is This possible - Correlli - 21.07.2009

And where did you defined "go" variable for timer?


Re: Is This possible - [top_Shoter] - 21.07.2009

on one of my cmd's

pawn Код:
SetTimerEx("go", 30000, 0, "i", playerid);



Re: Is This possible - Correlli - 21.07.2009

You got it wrong.

I'll give you and example:
pawn Код:
// variable.
new go[MAX_PLAYERS];

// set timer for player.
go[playerid] = SetTimerEx("GoTimer", 30000, 0, "i", playerid);

// kill timer for player.
KillTimer(go[playerid]);



Re: Is This possible - [top_Shoter] - 21.07.2009

Quote:
Originally Posted by Don Correlli
You got it wrong.

I'll give you and example:
pawn Код:
// variable.
new go[MAX_PLAYERS];

// set timer for player.
go[playerid] = SetTimerEx("GoTimer", 30000, 0, "i", playerid);

// kill timer for player.
KillTimer(go[playerid]);

thanks mate your a star



Re: Is This possible - Correlli - 21.07.2009

You're welcome.


Re: Is This possible - [top_Shoter] - 21.07.2009

when i try it i get this

Код:
C:\Documents and Settings\Marcus\My Documents\marcus server\gamemodes\shady.pwn(2122) : error 021: symbol already defined: "go"
C:\Documents and Settings\Marcus\My Documents\marcus server\gamemodes\shady.pwn(19714) : error 028: invalid subscript (not an array or too many subscripts): "go"
C:\Documents and Settings\Marcus\My Documents\marcus server\gamemodes\shady.pwn(19714) : warning 215: expression has no effect
C:\Documents and Settings\Marcus\My Documents\marcus server\gamemodes\shady.pwn(19714) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\Marcus\My Documents\marcus server\gamemodes\shady.pwn(19714) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Marcus\My Documents\marcus server\gamemodes\shady.pwn(19714) : fatal error 107: too many error messages on one line
pawn Код:
public go(playerid)
{
Robbery(playerid);
}
line 19714

pawn Код:
go[playerid] = SetTimerEx("GoTimer", 30000, 0, "i", playerid);



Re: Is This possible - Correlli - 21.07.2009

Function name and variable name shouldn't be the same.

pawn Код:
public go(playerid)
{
Robbery(playerid);
}
change to:
pawn Код:
public GoTimer(playerid)
{
Robbery(playerid);
}