Is This possible
#1

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
Reply
#2

https://sampwiki.blast.hk/wiki/OnPlayerLeaveCheckpoint
or
https://sampwiki.blast.hk/wiki/OnPlayerInteriorChange
Reply
#3

Fixed
Reply
#4

And where did you defined "go" variable for timer?
Reply
#5

on one of my cmd's

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

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]);
Reply
#7

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
Reply
#8

You're welcome.
Reply
#9

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);
Reply
#10

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)