/createpickup
#1

i cant get this fix. creating a pickup and setting the amounts of money on it . who ever pick it up will get the amount of money from the pickup. please help.
Reply
#2

let's start
PHP код:
new mypickup[MAX_PLAYERS]; 
// create cmd 
mypickup[playerid] = CreatePickup/// script ) ; 
// callback on player enter pickups
if(pickupid == mypickup[playerid])
    {
        
GivePlayerMoney(playerid1000);
DestroyPickup(mypickup[playerid]);
    } 
Reply
#3

Something like this:



Код:
new pickup1;

public OnGameModeInit()
      pickup1 = CreatePickup(1318,9000000,-1033.5370,-1189.0121,129.2188);//Position of Pickup

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == pickup1)//Name of pickup
    {
       GivePlayerMoney(playerid, 800);//Amount
       return 1;
}
    }
Reply
#4

yes. the both of you did it right but i mean like set the amount of money on anypickup i create. like this

Quote:

/createpickup 1212(object id) 500(the amount of money)

Reply
#5

i need help
Reply
#6

Код:
[new]
new vehrepair;
 
public OnGameModeInit()
{
        Create3DTextLabel("Grab it fast!\n$500 dude!", text, color, x,y,z, drawdistance, virtualworld, testLOS);
        vehrepair = CreatePickup(model, pickupsid, x,y,z, virtualworld (-1 to make it show all worlds));
        return 1;
}
 
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == vehrepair)
    {
        GivePlayerMoney(playerid,500);     
    }
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)