How can I? - 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)
+--- Thread: How can I? (
/showthread.php?tid=583731)
How can I? -
TheRaGeLord - 30.07.2015
How Can i pass multiple params to a function through SetTimerEx
This isn't working
PHP код:
stock arrest(playerid, time)
{
TogglePlayerControllable(playerid, true);
new oldskin = GetPlayerSkin(playerid);
Player[playerid][jailed]=1;
Player[playerid][cuffed]=0;
SetPlayerSpecialAction(playerid, 0);
new skin;
new num=random(2);
switch(num)
{
case 0: skin=62;
case 1: skin=50;
case 2: skin=134;
}
SetPlayerSkin(playerid,skin);
SetPlayerInterior(playerid,10);
SetPlayerPos(playerid,223.27516, 109.36853, 1000.06482);
SetTimerEx("releasejail",time*60*1000,false,"dd",{playerid,oldskin});
return 1;
}
forward releasejail(playerid,oldskin);
public releasejail(playerid,oldskin)
{
SetPlayerSkin(playerid, oldskin);
return 1;
}
It is giving error "error 008: must be a constant expression; assumed zero" at the Timer Line
Re: How can I? -
Dan. - 30.07.2015
Why are you putting the parameters inside brackets? Just:
pawn Код:
SetTimerEx("releasejail",time*60*1000,false,"dd", playerid,oldskin);