Pickup help - 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: Pickup help (
/showthread.php?tid=364036)
Pickup help -
Pokiri_Boii - 29.07.2012
Hey guys..
I have created a pickup and i wanted to give it a function here is the things i did .. !!
First i defined it ,
added this
pawn Код:
heli = AddStaticPickup(1318, 1, -2353.2561,-1616.3075,483.6445); //Spawn PickUp
Then added this
pawn Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == heli) GivePlayerMoney(playerid,100000);
return 1;
}
The pickup was in the game and when i went to it showed "type bankhelp...." ... I made this as a filterscript.
In my gamemode script i searched for pickup id and i got the same as it was showing like 'type bank help .. "
How can make this as my command ?
pawn Код:
GivePlayerMoney(playerid,1000000);
NEED HELP , THANK YOU!
Re: Pickup help -
Littlehelper - 29.07.2012
Remove OnPlayerPickupPickup.
And here is the command.
pawn Код:
CMD:heli(playerid,params[])
{
if(!IsPlayerInRangeOfPoint(playerid,10,-2353.2561,-1616.3075,483.6445)) return SendClientMessage(playerid,-1,"You Must Be At The Position To Type This Command");
GivePlayerMoney(playerid,100000);
return 1;
}
Re: Pickup help -
Pokiri_Boii - 29.07.2012
Quote:
Originally Posted by Littlehelper[MDZ]
Remove OnPlayerPickupPickup.
And here is the command.
pawn Код:
CMD:heli(playerid,params[]) { if(!IsPlayerInRangeOfPoint(playerid,10,-2353.2561,-1616.3075,483.6445)) return SendClientMessage(playerid,-1,"You Must Be At The Position To Type This Command"); GivePlayerMoney(playerid,100000); return 1; }
|
But, Dude i dont want the player to type a command .. !! Is there any way to fix OnplayerPickupPickup ?
Re: Pickup help -
Littlehelper - 29.07.2012
Quote:
Originally Posted by Pokiri_Boii
But, Dude i dont want the player to type a command .. !! Is there any way to fix OnplayerPickupPickup ?
|
When it comes to your pickup method, i dont understand a word you said there.
Only thing i understood was "how can i make this as command" therefore i created one as command.
Elaborating a little will help me in order to fix the code.
Re: Pickup help -
Devilxz97 - 29.07.2012
pawn Код:
#include a_samp
new heli;
public OnGameModeInit()
{
heli = CreatePickup(1318, 1, -2353.2561,-1616.3075,483.6445);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == heli)
{
GivePlayerMoney(playerid,100000);
SendClientMessage(playerid, -1, "You got $100k! by collect the pickups!");
}
return 1;
}
Re: Pickup help -
Pokiri_Boii - 29.07.2012
Quote:
Originally Posted by Devilxz97
pawn Код:
#include a_samp
new heli;
public OnGameModeInit() { heli = CreatePickup(1318, 1, -2353.2561,-1616.3075,483.6445); return 1; }
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == heli) { GivePlayerMoney(playerid,100000); SendClientMessage(playerid, -1, "You got $100k! by collect the pickups!"); } return 1; }
|
Thanks Dude.. +rep
PS: to the other guy .. (:PPP)
Re: Pickup help -
Devilxz97 - 29.07.2012
lolz
Re: Pickup help -
Pokiri_Boii - 29.07.2012
dude.... But that type /bankhelp ... Is showing up ... Any way to solve it?