[help]pickup
#3

1274 is the id of the money object not the id of your pickup that you created.

new playerPickupID[MAX_PLAYERS];

if(strcmp(cmdtext, "/pickup", true) == 0)
{
if(IsPlayerAdmin(playerid))
{

new Float:X, Float:Y, Float:Z, Float:Ang;
GetPlayerPos(playerid, X, Y, Z);
GetPlayerFacingAngle(playerid, Ang);
X += (3 * floatsin(-Ang, degrees));
Y += (3 * floatcos(-Ang, degrees));
playerPickupID[playerid] = CreatePickup(1274, 2, X+2, Y, Z); //playerPickupID[playerid] != 1274
return 1;
}
else return SendClientMessage(playerid,0xAA3333AA,"You Aren't Rcon Admin");
}


but when i use /pickup 1274 (which is the dollar) and some one pick it nothing happens , how to make when player pick it up he gets 1000 $

i made this :

public OnPlayerPickUpPickup(playerid,pickupid)
{
for(new i=0; i<GetMaxPlayers(); i++)
{
if(pickupid == playerPickupID[i]
{
GivePlayerMoney(playerid,1000);
return 1;
}
}
}
Reply


Messages In This Thread
[help]pickup - by hvampire - 28.01.2010, 04:10
Re: [help]pickup - by Onyx09 - 28.01.2010, 04:12
Re: [help]pickup - by mansonh - 28.01.2010, 05:32
Re: [help]pickup - by hvampire - 28.01.2010, 07:25
Re: [help]pickup - by mansonh - 28.01.2010, 17:28
Re: [help]pickup - by MadeMan - 28.01.2010, 17:39

Forum Jump:


Users browsing this thread: 1 Guest(s)