12.05.2017, 10:51
Quote:
At this point i'd have to ask you show me the block of code where that warning appears.
|
PHP код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == me)
{
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(me);
}
return 1;
}
IRCCMD:givecookies(botid, channel[], user[], host[], params[])
{
new id, aCookies;
if(IRC_IsOp(botid, channel, user))
{
if(sscanf(params, "ui", id,aCookies))
{
IRC_Say(groupID, channel, "7Usage: 1!givecoin [id] [Cookies]");
return 1;
}
if(aCookies < 1 || aCookies > 100)
{
IRC_Say(groupID, channel, "Invalid Number [from 1 to 100 Cookies]");
}
if(!IsPlayerConnected(id)) return IRC_Say(groupID, channel, "Invalid Player ID.");
{
new pname[MAX_PLAYER_NAME], bString[128];
GetPlayerName(id, pname, sizeof(pname));
format(bString, sizeof(bString), "You have given %s (ID: %d) %d Cookies.",pname, id, aCookies);
IRC_Say(groupID, channel, bString);
format(bString, sizeof(bString), "(#ZoneX) Admin %s given %s (ID: %d) %d Cookies", user, pname, id, aCookies);
SendClientMessage(id, COLOR_YELLOW, bString);
pData[id][Cookies] += aCookies;
}
}
else return IRC_Say(groupID, channel, "7Error: 1You must be OP");
return 1;
}
and every command has pData[playerid][Cookies]