Pickups
#1

So i was trying to learn, how to create several pickups in my test server, but I don't know what's wrong...There's no errors when compiled, but when i'm in server, these pickups aren't do things like i wrote in the script.So This is the code for first pickup under OnGameModeInit:
Код:
CreatePickup(355, 2, -2402.0496,-2174.4465,33.2891, -1);
As you see it's only simple pickup and when i take it, i have automaticaly get a gun-AK47.But there is second pickup, which have some more code:
(top-this is a variable in which i will store the pickup)
Код:
new mypickup;
Then command /iwantpickup:
Код:
{
if(strcmp("/iwantpickup", cmdtext, true) == 0)
{
mypickup = CreatePickup(1274, 0, -2334.7681,-2179.3489,35.1945, -1);
return 1;
}
And under the OnPlayerPickUpPickup:
Код:
{
if(pickupid == mypickup)
GivePlayerMoney(playerid, 100);
SendClientMessage(playerid, 0xFFFFFFFF, "You are very lucky buddy, because you the one who found 100$!")
return 1;
}
return 0;
}
}
So the main problem is when i take the first pickup, so the 355, which is a gun like i sayed, i get a message in the chatbox: You are very lucky buddy, because you the one who found 100$!, which is only assigned for mypickup variable, and in this variable there is no 355 model pickup there is 1274-cash icon pickup.So wtf is that?!Why when i take first pickup, which doesn't have any message in the code, it displays message which assigned only for 1274 pickup-I don't understand this!I aprreciate every help from community!
Reply


Messages In This Thread
Pickups - by karakana7 - 26.10.2010, 12:29
Re: Pickups - by MadeMan - 26.10.2010, 12:43
Re: Pickups - by karakana7 - 26.10.2010, 12:58
Re: Pickups - by MadeMan - 26.10.2010, 13:02
Re: Pickups - by karakana7 - 26.10.2010, 13:11
Re: Pickups - by MadeMan - 26.10.2010, 13:25
Re: Pickups - by karakana7 - 26.10.2010, 15:05
Re: Pickups - by MadeMan - 26.10.2010, 15:07
Re: Pickups - by karakana7 - 26.10.2010, 15:55
Re: Pickups - by karakana7 - 26.10.2010, 17:32

Forum Jump:


Users browsing this thread: 1 Guest(s)