[HELP] Pickups -
P!x3L - 10.04.2011
Hy guys
![Cheesy](images/smilies/biggrin.png)
as you can see i am new on this forum
![Smiley](images/smilies/smile.png)
i'm sorry if i make some mistake in writing, i have VERY bad english :P
I have a problem with pickups. I am put some pickups in my gamemode and i want to show GameTex when i pick up pickup. Here is code for better explanation:
Код:
new pickup[6]; //i put more pickups...
public OnGameModeInit()
{
pickup[5] = CreatePickup(...);
return 1;
}
public OnPlayerPickuUpPickup(playerid, pickupid)
{
if(pickupid == pickup[5]) GameTextForPlayer(playerid, "...", ...);
return 1;
}
I dont get any errors, but when i go to the pickup nothing happens :S can anybody help me whit this
![Huh?](images/smilies/confused.gif)
Once more, sorry for bad english :P
Re: [HELP] Pickups -
Admigo - 10.04.2011
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == zone)
{
if(gTeam[playerid]==P)
{
SendClientMessageToAll(COLOR_YELLOW,"The President team has token the Dictator Zone");
GangZoneDestroy(Blue);
Blue = GangZoneCreate(-81.782714, 1628.125732, 430.217285, 2140.125732);
GangZoneShowForAll( Blue, 65477);//red = team 65477= Color(blue))
}
}
Ignore the gTeam!
Re: [HELP] Pickups -
Shelby - 10.04.2011
I have tested your code, and here it works perfectly.
Here's code that i used:
InPut:
pawn Код:
new pickup[6]; //i put more pickups...
public OnGameModeInit()
{
pickup[5] = CreatePickup(1239,1,1529.6,-1691.2,13.3, -1);
return 1;
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pickup[5]) GameTextForPlayer(playerid, "~r~Test sucefully", 5000, 1);
return 1;
}
OutPut:
Re: [HELP] Pickups -
P!x3L - 10.04.2011
Is important if i put CreatePickup(1239,
23, 1529.6,-1691.2,13.3, -1);
instead CreatePickup(1239,
1, 1529.6,-1691.2,13.3, -1);
![Huh?](images/smilies/confused.gif)
?
Re: [HELP] Pickups -
Shelby - 10.04.2011
No, that's just the spawn type.
I've tried with type 23 also, and it worked.
Re: [HELP] Pickups -
P!x3L - 10.04.2011
OMG then i dont know what is going on whit my computer! something work good, something bad, something dont work :S i dont know, i go test one more time, i switched somethin in my mode now, i go see what will be now...
Re: [HELP] Pickups -
P!x3L - 10.04.2011
OMG i did it :P
OMG what 3 lines can do whit mode :S only 3 lines i moved on other place, and now it's working
![Cheesy](images/smilies/biggrin.png)
tnx for help...
Re: [HELP] Pickups -
Admigo - 10.04.2011
Nice to hear that it works