Pickup help
#1

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 ,

pawn Код:
new heli;
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!
Reply
#2

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;
}
Reply
#3

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 ?
Reply
#4

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.
Reply
#5

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;
}
Reply
#6

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)
Reply
#7

lolz
Reply
#8

dude.... But that type /bankhelp ... Is showing up ... Any way to solve it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)