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.