PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == pgs)
{
if(takenbyplayer == true) { SendClientMessage(playerid, COLOR_YELLOW, "* Sorry the hidden pickup already taken by other players"); return 1;}
new szString[128];
takenbyplayer = true;
format(szString, sizeof(szString), "* You have been found the Player hidden pickup and win %d cookies", Max);
SendClientMessage(playerid, COLOR_GREEN, szString);
SendClientMessage(playerid, COLOR_GREEN, "* You can use your cookies by typing /rocket");
pData[playerid][Cookies] += Max;
new test[128], szName[MAX_PLAYER_NAME];
GetPlayerName(playerid, szName, sizeof(szName));
format(test,sizeof(test),"%s has found the ZoneX Hidden pickup and won %d cookies", GetName(playerid), Max);
new IRC[130];
format(IRC, sizeof(IRC), "0,3* %s has Found the Player Hidden Pickup won %d Cookies.",GetName(playerid),Max);
IRC_GroupSay(groupID, IRC_CHANNEL, IRC);
SetTimerEx("pgoos", 10000, false, "i", playerid);
DestroyPickup(pgs);
}
//House
new houseid = -1;
new IDD = IsPlayerNearHouse(playerid);
for(new idd; idd<MAX_HOUSES; idd++)
{
if(HouseInfo[idd][HousePickup] == pickupid)
{
houseid = idd;
break;
}
}
if(houseid != -1)
{
new str[128];
format(str, 128, "~y~Price: ~w~$%d~n~~y~Owner: ~w~%s~n~~y~House ID: ~w~%d", HouseInfo[houseid][HouseValue], HouseInfo[houseid][HouseOwner], IDD);
GameTextForPlayer(playerid, str, 6000, 3);
new ownerid = GetPlayerID(HouseInfo[IDD][HouseOwner]);
if(ownerid == playerid)
{
SetPlayerHealth(ownerid,100.0);
SetPlayerArmour(ownerid,100.0);
}
}
return 1;
}
If iam going to a house pickup it disappear and it shows me "you have been found....." why?