08.06.2012, 22:13
Код:
Pickup1 = CreatePickup(1550, 2, BagPos[0], BagPos[1], BagPos[2], -1); Pickup2 = CreatePickup(1254, 2, BagPos[0], BagPos[1], BagPos[2], -1);
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if(pickupid == Pickup1) { SendClientMessage(playerid, -1, "TEST 1"); DestroyPickup(Pickup1); if(PlayerInfo[playerid][CbPoint] >= 4) { PlayerInfo[playerid][Exp]++; PlayerInfo[playerid][CbPoint] = 0; SendClientMessage(playerid, COLOR_YELLOW, "You are getting stronger Exp +1"); } for(new i = 0; i < MAX_PLAYERS; i++) { RemovePlayerMapIcon( i, 25 ); } } else if(pickupid == Pickup2) { SendClientMessage(playerid, -1, "TEST 2!"); DestroyPickup(Pickup2); PlayerInfo[playerid][GbPoint]++; if(PlayerInfo[playerid][GbPoint] >= 4) { PlayerInfo[playerid][Exp]++; PlayerInfo[playerid][GbPoint] = 0; SendClientMessage(playerid, COLOR_YELLOW, "You are getting stronger Exp +1"); } for(new i = 0; i < MAX_PLAYERS; i++) { RemovePlayerMapIcon( i, 26 ); } } return 1; }