18.04.2015, 12:16
Hello. The boredom, I tried to do a system event specifically searched for some gifts (pickup), the problem is only going to last gift that makes spam,.
PHP код:
#define MAX_PGIFTS (50)
new cadou[MAX_PGIFTS];
public OnPlayerPickUpPickup( playerid, pickupid )
{
for(new ID = 0; ID < MAX_PGIFTS; ID++)
{
if(pickupid == cadou[ID])
{
DestroyPickup(cadou[ID]);
GivePlayerMoney(playerid, 500000);
new x;
x++;
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++)
{
cadou[ID] = CreatePickup(19057, 2, x,y+10,z, -1);
}
return 1; }