Pickup - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Pickup (
/showthread.php?tid=182123)
Pickup -
Dime - 09.10.2010
Mine problem:
I have in gamemode to admin can make hiden package(pickup) when player pick it get somethin...
Btw i added today some fs in my server with pickups..Now when player pick those pickups it write he found hiden package..But he didnt.So when player pick any pickup it will write he found hp.Anyone know how fix that?
I have
Quote:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup)
{
//what happend when player pick hided package
}
return 1;
}
|
Re: Pickup -
Matej_ - 09.10.2010
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup) // Change pickup to your pickup name ..
{
new name[MAX_PLAYER_NAME], string[44];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s has found the hidden pickup.",name);
SendClientMessageToAll(0xFFFF00AA, string);
}
return 1;
}
// You can also use Game Text's when player finds the hidden pickup.
Re: Pickup -
Dime - 09.10.2010
I know do that.But idk why reconogize all pickups as that.
Re: Pickup -
Matej_ - 09.10.2010
Quote:
Originally Posted by oттo
I know do that.But idk why reconogize all pickups as that.
|
It's because you named all pickups >
pickup <
Re: Pickup -
Dime - 09.10.2010
No..Only hp is called "pickup"
Re: Pickup -
WillyP - 09.10.2010
do stuff like
new pickuph
new pickupa
new pickupw
pickuph = health
pickupa = armour
pickupw = weapon
ect