How to create Pickups [Simple] -
xMCx - 08.09.2012
Hello this is the first post after i joined sa-mp forum, im a new scripter and i have some knowledge that may help the other scripting beginners, and today ill make a tutorial about pickups.
pickups are icons they might look like guns or another icon models.
for the pickup models and types visit :
https://sampwiki.blast.hk/wiki/Pickup_IDs
Lets start!
im gonna make a marker, lets define it
now after that we need to explain what "marker" is so the script can understand
under
PHP код:
public OnFilterScriptInit()
or
PHP код:
public OnGameModeInit()
write:
PHP код:
marker = CreatePickup(1318, 1, 1654.0273,-1655.9581,22.5156);//(model,type,z,x,y);
now you can see the pickup IG but its useless so we gonna enter a job for it, and this pickup is used to send me a message now , look for this function:
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
this function works if the player walked through the pickup so now under it ,write:
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == marker)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*/enter to enter this building!"); // Message the player
}
return 1;
}
in the last it should look like this :
PHP код:
#include <a_samp>
#if defined FILTERSCRIPT
new marker;
public OnFilterScriptInit()
{
marker = CreatePickup(1318, 1, 1654.0273,-1655.9581,22.5156);// model,type,z,x,y
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)//pickup related function
{
if(pickupid == marker)//this to make sure that the pickup we want is marker
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*/enter to enter this building!"); // Message the player
}
return 1;
}
sorry for my bad english , if you didnit understand any part please reply and this is my first tutorial so be easy on me if it wasnt that good :P, please rate it
Re: How to create Pickups [Simple] -
XStormiest - 08.09.2012
easy but good for newbie
Re: How to create Pickups [Simple] -
xMCx - 08.09.2012
thanks
Re : How to create Pickups [Simple] -
Crazy_Sniper - 13.09.2012
thank you , you helped me a lot!
Re: Re : How to create Pickups [Simple] -
xMCx - 13.09.2012
Quote:
Originally Posted by Crazy_Sniper
thank you , you helped me a lot!
|
no problem
Re: How to create Pickups [Simple] -
[LB]BlAcK_DeViL - 13.09.2012
good work
Re: How to create Pickups [Simple] -
MoDee - 13.09.2012
Great tutorial for newbies
Re: How to create Pickups [Simple] -
xMCx - 13.09.2012
Yes , thanks , ill help more as i can
Re: How to create Pickups [Simple] -
[LB]BlAcK_DeViL - 20.09.2012
But How To Make it as Dilog Text ??
Re: How to create Pickups [Simple] -
dino_d_carter - 03.12.2012
Nice

+rep i like all yous tutorials