08.09.2012, 13:03
(
Последний раз редактировалось xMCx; 08.09.2012 в 13:49.
)
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
or
write:
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:
this function works if the player walked through the pickup so now under it ,write:
in the last it should look like this :
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
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
PHP код:
new marker;
under
PHP код:
public OnFilterScriptInit()
PHP код:
public OnGameModeInit()
PHP код:
marker = CreatePickup(1318, 1, 1654.0273,-1655.9581,22.5156);//(model,type,z,x,y);
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == marker)
{
SendClientMessage(playerid, COLOR_LIGHTBLUE, "*/enter to enter this building!"); // Message the player
}
return 1;
}
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;
}