SetTimerEx Calling functions! [Rep+]
#1

Hello everyone,

I made this callback to be used when the player uses the cmd /nb [PlayerID]. This works properly.

pawn Код:
forward Nb(playerid,giveplayerid);
public Nb(playerid,giveplayerid)
{
    new Float:Pos[3];
    GetPlayerPos(giveplayerid,Pos[0],Pos[1],Pos[2]);
    DestroyObject(Plane);

    Plane = CreateObject(1683,Pos[0],Pos[1],Pos[2]+50,0.000,270.000,270.0000); //Jumbo plane
    MoveObject(Plane, Pos[0],Pos[1],Pos[2]-50, 100.0);
    //SetObjectRot(Plane, 0.0,270.0,270.0);
}
I want to set SetTimerEx to call back this function in a time delay of 10 seconds. But how can i pass the values of the argument's/parameters used in the callback? Like it is playerid & giveplayerid over here!

Any suggestions how can i do it? Will rep everyone who will help
Reply
#2

pawn Код:
SetTimerEx("Nb", 1000*10, false, "ii", playerid, giveplayerid);
Something like this, I figure.
Reply
#3

Quote:
Originally Posted by 2KY
Посмотреть сообщение
pawn Код:
SetTimerEx("Nb", 1000*10, false, "ii", playerid, giveplayerid);
Something like this, I figure.
OMFG 2KY you're fucking awesome bro. Thanks. I never though that last parameters of SetTimerEx works like this. (Repped)

Problem Solved!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)