timer
#10

Quote:
Originally Posted by sggassasin
thx for the help man you wouldent happen to know how to make it so when the player picks it up no 1 can get the case and when that play dies the case drops and after like 1min it respawns at its location would you thx for the help
pawn Код:
#include <a_samp>

new Pickup;

new PlayerMoney;

new PlayerMoneyPickup;

public OnGameModeInit()
{
Pickup = CreatePickup(1212, 2, Float:x, Float:y, Float:z);
return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
PlayerMoney = GetPlayerMoney(playerid);
PlayerMoneyPickup = CreatePickup(1212, 2, Float:x, Float:y, Float:z);
return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Pickup)
{
GivePlayerMoney(playerid, amount);
DestroyPickup(Pickup);
return 1;
}
if(pickupid == PlayerMoneyPickup)
{
GivePlayerMoney(playerid, PlayerMoney);
DestroyPickup(PlayerMoneyPickup);
return 1;
}
return 1;
}
EDIT: Just put it into your filterscript. I didn't include everything, like I didn't include the timer.

@Karlip: Oh, I forgot that. :S
Reply


Messages In This Thread
timer - by sggassasin - 18.07.2009, 09:06
Re: timer - by MenaceX^ - 18.07.2009, 09:26
Re: timer - by sggassasin - 18.07.2009, 09:28
Re: timer - by refshal - 18.07.2009, 09:29
Re: timer - by sggassasin - 18.07.2009, 09:44
Re: timer - by Karlip - 18.07.2009, 09:46
Re: timer - by sggassasin - 18.07.2009, 09:48
Re: timer - by Karlip - 18.07.2009, 09:50
Re: timer - by sggassasin - 18.07.2009, 09:53
Re: timer - by refshal - 18.07.2009, 09:53
Re: timer - by Karlip - 18.07.2009, 09:55
Re: timer - by refshal - 18.07.2009, 09:57
Re: timer - by sggassasin - 18.07.2009, 10:06
Re: timer - by sggassasin - 18.07.2009, 10:12
Re: timer - by refshal - 18.07.2009, 10:16
Re: timer - by sggassasin - 18.07.2009, 10:39
Re: timer - by refshal - 18.07.2009, 10:42
Re: timer - by sggassasin - 18.07.2009, 10:50
Re: timer - by sggassasin - 18.07.2009, 10:56
Re: timer - by MenaceX^ - 18.07.2009, 11:12

Forum Jump:


Users browsing this thread: 1 Guest(s)