18.04.2015, 12:22
PHP код:
#define MAX_PGIFTS (50)
enum pGift
{
cadou,
x
};
new GiftInfo[MAX_PGIFTS][pGift];
public OnPlayerPickUpPickup( playerid, pickupid )
{
for(new ID = 0; ID < MAX_PGIFTS; ID++)
{
if(pickupid == GiftInfo[ID][cadou])
{
DestroyPickup(GiftInfo[ID][cadou]);
GivePlayerMoney(playerid, 500000);
GiftInfo[x][cadou]++;
SendClientMessage(playerid, 0x67B0CFFF,"Event: {FFFFFF}Felicitari! Ai gasit un cadou si ai primit {FA6B3E}500.000${FFFFFF}.");
SendClientMessage(playerid, 0x67B0CFFF,"Event: {FFFFFF}Pana acum ai gasit %d cadouri.", x);
}
}
return 1;
}
CMD:test1( playerid, params[ ] ) {
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x,y,z);
for(new ID = 0; ID < MAX_PGIFTS; ID++)
{
GiftInfo[ID][cadou] = CreatePickup(19057, 2, x,y+10,z, -1);
}
return 1; }