SA-MP Forums Archive
Ysi - Pickup_add - 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: Ysi - Pickup_add (/showthread.php?tid=151830)



Ysi - Pickup_add - Cameltoe - 01.06.2010

Код:
#define FILTERSCRIPT

#include <a_samp>
#include <YSI>
#define MAX_VIEW_DISTANCE 600
#define MAX_DYN_OBJECTS (10000)
//// YSI config

//// Unused
#pragma unused Langs_AddFile
#pragma unused Langs_AddLanguage

public OnFilterScriptInit()
{
CreateDynamicObject(1433, 2040, 1349, 10, 0, 0, 96);
Pickup_Add(370, 2040,1321,10, 5000, -1, 1, 1); // Jet pack 1
Pickup_Add(370, 2018,-1415,17, 5000, -1, 1, 1); // Jet pack 2
Pickup_Add(370, 2033,-1430,17, 5000, -1, 1, 1); // Jet Pack 3
Pickup_Add(371, 1550,-1363,329, 5000, -1, 1, 1); // para 1
Pickup_Add(371, 1546.5,-1363,329, 5000, -1, 1, 1); // para 2
Pickup_Add(371, 1543,-1363,329, 5000, -1, 1, 1); // para 3
return 1;
}
Pickup shows up but when picking it up the player dosn't get the player.. why?


Re: Ysi - Pickup_add - coole210 - 01.06.2010

OnPlayerPickUpPickup

https://sampwiki.blast.hk/wiki/OnPlayerPickUpPickup


Re: Ysi - Pickup_add - Cameltoe - 01.06.2010

Not sure why but:

Код:
//// Pickups
new jpack, jpack2, jpack3, para, para2, para3;


jpack = Pickup_Add(370, 2040,1321,10, 5000, -1, 1, 1); // Jet pack 1
jpack2 = Pickup_Add(370, 2018,-1415,17, 5000, -1, 1, 1); // Jet pack 2
jpack3 = Pickup_Add(370, 2033,-1430,17, 5000, -1, 1, 1); // Jet Pack 3
para = Pickup_Add(371, 1550,-1363,329, 5000, -1, 1, 1); // para 1
para2 = Pickup_Add(371, 1546.5,-1363,329, 5000, -1, 1, 1); // para 2
para3 = Pickup_Add(371, 1543,-1363,329, 5000, -1, 1, 1); // para 3
Is giving me:

Код:
C:\xxx\objects.pwn(24) : warning 204: symbol is assigned a value that is never used: "para3"
C:\xxx\objects.pwn(23) : warning 204: symbol is assigned a value that is never used: "para2"
C:\xxx\objects.pwn(22) : warning 204: symbol is assigned a value that is never used: "para"
C:\xxx\objects.pwn(21) : warning 204: symbol is assigned a value that is never used: "jpack3"
C:\xxx\objects.pwn(20) : warning 204: symbol is assigned a value that is never used: "jpack2"
C:\xxx\objects.pwn(19) : warning 204: symbol is assigned a value that is never used: "jpack"
And:

Код:
C:\xxx\objects.pwn(43) : error 017: undefined symbol "jpack"
when used in:

Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
  if(pickupid == jpack) GivePlayerMoney(playerid,10000);
  return 1;
}