[HELP] Pickups
#1

Hy guys as you can see i am new on this forum 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
Once more, sorry for bad english :P
Reply
#2

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!
Reply
#3

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:
Reply
#4

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);
?
Reply
#5

No, that's just the spawn type.
I've tried with type 23 also, and it worked.
Reply
#6

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...
Reply
#7

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
tnx for help...
Reply
#8

Nice to hear that it works
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)