26.10.2010, 12:29
(
Последний раз редактировалось karakana7; 26.10.2010 в 13:12.
)
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:
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)
Then command /iwantpickup:
And under the OnPlayerPickUpPickup:
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!
Код:
CreatePickup(355, 2, -2402.0496,-2174.4465,33.2891, -1);
(top-this is a variable in which i will store the pickup)
Код:
new mypickup;
Код:
{ if(strcmp("/iwantpickup", cmdtext, true) == 0) { mypickup = CreatePickup(1274, 0, -2334.7681,-2179.3489,35.1945, -1); return 1; }
Код:
{ 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; } }
![Smiley](images/smilies/smile.png)