SA-MP Forums Archive
[Help] - 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)
+--- Thread: [Help] - Pickup ? (/showthread.php?tid=371102)



[Help] - Pickup ? - SpaMaster - 22.08.2012

I adding some pickups in interior(not random), but I can't see it. There is what I added:

Код:
new RMgun;
Код:
RMgun = CreatePickup(31,1,1851.8812,-1718.4275,2796);
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
	if(pickupid == RMgun)
 	{
	GivePlayerWeapon(playerid, 31, 150);
	SCM(playerid, COLOR_WHITE, "Uzeo si M4 (150 metaka)");
 	}
  return 1;
}



Re: [Help] - Pickup ? - clarencecuzz - 22.08.2012

http://www.wiki.SA-mp.com/wiki/CreatePickup

It states that you should use -1 to make it visible in all virtual worlds. So try adding -1 to your CreatePickup line.


Re: [Help] - Pickup ? - SpaMaster - 22.08.2012

Quote:
Originally Posted by clarencecuzz
Посмотреть сообщение
http://www.wiki.SA-mp.com/wiki/CreatePickup

It states that you should use -1 to make it visible in all virtual worlds. So try adding -1 to your CreatePickup line.
Nope, It isn't work.


Re: [Help] - Pickup ? - detter - 22.08.2012

Код:
RMgun = CreatePickup(356,1,1851.8812,-1718.4275,2796);
try this


Re: [Help] - Pickup ? - SpaMaster - 22.08.2012

Quote:
Originally Posted by detter
Посмотреть сообщение
Код:
RMgun = CreatePickup(356,1,1851.8812,-1718.4275,2796);
try this
Work, thanks . What you change ?


Re: [Help] - Pickup ? - tiernantheman - 22.08.2012

You are using an invalid pickup model. You can find pickup id's here. https://sampwiki.blast.hk/wiki/Game_Object_ID_List. Example.
pawn Код:
RMgun = CreatePickup(1239, 1, X, Y, Z, -1);
X, Y And Z would be the coordinates for the pickup.


Re: [Help] - Pickup ? - detter - 22.08.2012

Model of your pickup :P


Re: [Help] - Pickup ? - SpaMaster - 22.08.2012

Quote:
Originally Posted by detter
Посмотреть сообщение
Model of your pickup :P
Can you send me Model of pickup:
AK47
MP5
Deagle.

Please ?


Re: [Help] - Pickup ? - tiernantheman - 22.08.2012

Quote:
Originally Posted by SpaMaster
Посмотреть сообщение
Can you send me Model of pickup:
AK47
MP5
Deagle.

Please ?
They are all in this list I provided. https://sampwiki.blast.hk/wiki/Game_Object_ID_List


Re: [Help] - Pickup ? - SpaMaster - 22.08.2012

I solved this, and I added SpeedCamera, but Cameras don't save. Here is SaveCamera:
Код:
stock SaveCamera(cameraid)
{
        new file[64];format(file,sizeof file,"SpeedCameras/%i.txt",cameraid);
        new INI:handler = INI_Open(file);
        INI_WriteFloat(handler,"_x",SpeedCameras[cameraid][_x]);
        INI_WriteFloat(handler,"_y",SpeedCameras[cameraid][_y]);
        INI_WriteFloat(handler,"_z",SpeedCameras[cameraid][_z]);
        INI_WriteFloat(handler,"_rot",SpeedCameras[cameraid][_rot]);
        INI_WriteInt(handler,"_range",SpeedCameras[cameraid][_range]);
        INI_WriteInt(handler,"_limit",SpeedCameras[cameraid][_limit]);
        INI_WriteInt(handler,"_fine",SpeedCameras[cameraid][_fine]);
        INI_WriteInt(handler,"_usemph",SpeedCameras[cameraid][_usemph]);
        INI_WriteBool(handler,"_activelabel",SpeedCameras[cameraid][_activelabel]);
        INI_WriteString(handler,"_labeltxt",SpeedCameras[cameraid][_labeltxt]);
        INI_Close(handler);
}
And It didn't picture speed.