SA-MP Forums Archive
Need Help With Pirate Ship script ! - 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: Need Help With Pirate Ship script ! (/showthread.php?tid=309214)



Need Help With Pirate Ship script ! - MR,Mr - 06.01.2012

Now I don't know what I am doing if the truths knows, But I want to make the script so it gives you money when you stand on the pirate ship in LV

I would like it to Give you $250 every 5 secs ? if possible




//-------------------[On Player Comand Text]------------------------------------

public OnPlayerCommandText(playerid, cmdtext[])


{
if(IsPlayerInRangeOfPoint(playerid,110.9, 2000.6461,1543.8600,13.5859))
{
GivePlayerMoney(playerid,10000);
SendClientMessage(playerid,0xFFFFFFFF,"You have Seized Control of the Pirate Ship!");
}
return 1;
}

thanks


Re: Need Help With Pirate Ship script ! - [WSF]ThA_Devil - 06.01.2012

just use checkpoints or pickups


Re: Need Help With Pirate Ship script ! - MR,Mr - 06.01.2012

But I want PlayerInRangeOfPoint


Re: Need Help With Pirate Ship script ! - [WSF]ThA_Devil - 06.01.2012

if you do that, you need to use timers not OnPlayerCommandText


Re: Need Help With Pirate Ship script ! - MR,Mr - 06.01.2012

Oh, ok How ?


Re: Need Help With Pirate Ship script ! - Face9000 - 06.01.2012

pawn Код:
forward PirateShipMoney();
public PirateShipMoney()
{
    for(new i=GetMaxPlayers()-1; i >=0; i--)
    {
        if(IsPlayerInRangeOfPoint(i,110.9, 2000.6461,1543.8600,13.5859))
        GivePlayerMoney(i,250);
        SendClientMessage(i,0xFFFFFFFF,"You have Seized Control of the Pirate Ship!");
    }
    return 1;
}
OnGameModeInit

pawn Код:
SetTimer("PirateShipMoney",5000,true);
Untested,maked on time,let me know if works.


Re: Need Help With Pirate Ship script ! - MR,Mr - 06.01.2012

RESOLVED


Re: Need Help With Pirate Ship script ! - sansko - 06.01.2012

anywhere outside other callbacks


Re: Need Help With Pirate Ship script ! - Face9000 - 06.01.2012

Quote:
Originally Posted by MR,Mr
Посмотреть сообщение
thanks for the help but where should i place these ?

forward PirateShipMoney();
public PirateShipMoney()
The forward add it where you have others forwards.

The public place it where you want,NOT in another public.