27.08.2015, 16:02
I made an info pickup on my server, so when you pick it up, it shouldn't dissapear and just leave you a GameText.
Its good, but when you pick it up, it also says you found the "tiki" (special prize on my server, /placetiki) and it dissapears. But it respawns after. And does the same stuff. I don't understand whats wrong...
Please help. Thank you
Its good, but when you pick it up, it also says you found the "tiki" (special prize on my server, /placetiki) and it dissapears. But it respawns after. And does the same stuff. I don't understand whats wrong...
Код:
new WorkPickup; new TikiStatuePickup; public OnPlayerPickUpPickup(playerid, pickupid) { new string[256], winnerName[MAX_PLAYER_NAME]; if(pickupid == TikiStatuePickup) { GetPlayerName(playerid, winnerName, sizeof(winnerName)); format(string, sizeof(string), "** %s has found the {FED801}tiki statue{8CDBF4} and won 10.000$!", winnerName); SendClientMessage(playerid, COLOR_SUCCESS, "** You have just found the {FED801}tiki statue{74E882}! You won 10.000$!"); SendClientMessageToAll(COLOR_AQUA, string); GivePlayerMoney(playerid, 10000); DestroyPickup(TikiStatuePickup); TikiPlacedCheck = 0; return 1; }else if(pickupid == WorkPickup) { GameTextForPlayer(playerid, "~w~Type ~r~/gangwork ~w~to begin working for gangs", 2000, 3); } return 1; }