Need Help With Pirate Ship script !
#1

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
Reply
#2

just use checkpoints or pickups
Reply
#3

But I want PlayerInRangeOfPoint
Reply
#4

if you do that, you need to use timers not OnPlayerCommandText
Reply
#5

Oh, ok How ?
Reply
#6

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.
Reply
#7

RESOLVED
Reply
#8

anywhere outside other callbacks
Reply
#9

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)