SA-MP Forums Archive
Roleplay Help - 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: Roleplay Help (/showthread.php?tid=491274)



Roleplay Help - hossamkandil - 30.01.2014

Hi Guys I'm Working On An RP Server But Got Kinda Stuck :-

I cant find a way on making jobs because the "SetTimer" function Doesn't Work

Can Please Tell Me A way for making jobs and earning money and points

ty


Re: Roleplay Help - Jacapo - 30.01.2014

Post your code of that function in SetTimer.


Re: Roleplay Help - MP2 - 30.01.2014

The SetTimer function works 100% fine.


Re: Roleplay Help - hossamkandil - 30.01.2014

ok ..


Re: Roleplay Help - hossamkandil - 30.01.2014

here it is

Quote:

forward CasinoBar(playerid);
new RandomMoney;
CMD:work(playerid,params[])
{
if(IsPlayerInRangeOfPoint(playerid,3,-2655.5090,1406.6702,906.2734))
{
TogglePlayerControllable(playerid,0);
SetPlayerPos(playerid,-2655.5090,1406.6702,906.2734);
SetPlayerFacingAngle(playerid,270);
SetCameraBehindPlayer(playerid);
SetTimer("CasinoBar",10000,false);
}
return 1;
}
public CasinoBar(playerid)
{
RandomMoney = random(20000);
TogglePlayerControllable(playerid,1);
GivePlayerMoney(playerid,RandomMoney);
}




Re: Roleplay Help - Jacapo - 30.01.2014

pawn Код:
forward CasinoBar(playerid);
new RandomMoney;
CMD:work(playerid,params[])
{
    if(IsPlayerInRangeOfPoint(playerid,3,-2655.5090,1406.6702,906.2734))
    {
        TogglePlayerControllable(playerid,0);
        SetPlayerPos(playerid,-2655.5090,1406.6702,906.2734);
        SetPlayerFacingAngle(playerid,270);
        SetCameraBehindPlayer(playerid);
        SetTimerEx("CasinoBar",10000,false,"i",playerid);
    }
    return 1;
}
public CasinoBar(playerid)
{
    RandomMoney = random(20000);
    TogglePlayerControllable(playerid,1);
    GivePlayerMoney(playerid,RandomMoney);
    return 1;
}
You cant use SetTimer for this situation (playerid).


Re: Roleplay Help - hossamkandil - 30.01.2014

Thanks Alot