Forward a playerid
#1

Hey,

Is it possible that when I forward a timer, that I forward playerid to? Like

pawn Код:
forward FlightToLosSantos();
public FlightToLosSantos()
{
    return 1;
}
Now it forwards without playerid

pawn Код:
forward FlightToLosSantos(playerid);
public FlightToLosSantos(playerid)
{
    GivePlayerMoney(playerid,-500);
    SetPlayerPos(playerid,0,0,0);
    return 1;
}
This is what I want: forward with playerid.

Regards, Jochem
Reply
#2

SetTimerEx("FlightToLosSantos", 1000, 0, "d", playerid);
Reply
#3

Yes, you can forward with playerid and other extra arguments.
Reply
#4

Doesnt work... Sorry. I mean that SetTimerEx
Reply
#5

Show your code
Reply
#6

Try this: SetTimerEx("FlightToLosSantos", 1000, 0, "i", playerid);
Reply
#7

You can use it just like this too:

pawn Код:
//Command...
FlightToLosSantos(playerid);
//...
Reply
#8

Maybe, but I need a working timer... I don't know why it doesnt work. That SetTimerEx what nazarOff gave me doesnt work to
Reply
#9

SetTimerEx("FlightToLosSantos", 1000, 0, "i", playerid); needs to be put under a callback, which passes the playerid variable so you can use it, eg OnPlayerConnect, OnPlayerSpawn, etc
Reply
#10

I know it. It is under a dialog response row. It works now, I guess...
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)