04.06.2015, 18:21
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == Star)
{
new name[ 24 ], amount, string[ 64 ]; new str[128];
GetPlayerName( playerid, name, 24 );
SendClientMessage(playerid,-1, "{FF0000}You found the {FFFF00}Hidden-Pickup {0066CC}!");
PlayerAcc[playerid][Cookies] += amount;
DestroyPickup(Star);
format( string, sizeof(string), "%s found the hidden-Pickup and won %i cookies!", name, amount);
GameTextForAll( string, 5000, 3 );
format(str, sizeof(str), "%s(id:%d) found the Hidden pickup and won %i cookies!", GetName(playerid), playerid, amount);
SendClientMessageToAll(COLOR_WHITE, str);
}
return 1;
}
{
if(pickupid == Star)
{
new name[ 24 ], amount, string[ 64 ]; new str[128];
GetPlayerName( playerid, name, 24 );
SendClientMessage(playerid,-1, "{FF0000}You found the {FFFF00}Hidden-Pickup {0066CC}!");
PlayerAcc[playerid][Cookies] += amount;
DestroyPickup(Star);
format( string, sizeof(string), "%s found the hidden-Pickup and won %i cookies!", name, amount);
GameTextForAll( string, 5000, 3 );
format(str, sizeof(str), "%s(id:%d) found the Hidden pickup and won %i cookies!", GetName(playerid), playerid, amount);
SendClientMessageToAll(COLOR_WHITE, str);
}
return 1;
}