03.09.2016, 02:22
Код:
public OnPlayerPickUpPickup(playerid, pickupid) { if (pickupid == bFlag) { SendClientMessage(playerid, 0xF00000,"You picked up blue bag"); if (gTeam[playerid] == TEAM_BLUE) { returner[playerid] = true; returnedB = true; Returned(playerid); DestroyPickup(bFlag); } if (gTeam[playerid] == TEAM_RED) { DestroyPickup(bFlag); new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s(Red) picked the bag", name); SendClientMessageToAll(0xC4C4C4FF, string); theif[playerid] = true; DestroyPickup(bFlag); if (helped[playerid] == true) { helped[playerid] = false; } } } if (pickupid == rFlag) { SendClientMessage(playerid, 0xF00000,"You picked up red bag"); if (gTeam[playerid] == TEAM_BLUE) { new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "%s(Blue) picked the bag", name); SendClientMessageToAll(0xC4C4C4FF, string); theif[playerid] = true; DestroyPickup(rFlag); if (helped[playerid] == true) { helped[playerid] = false; } } if (gTeam[playerid] == TEAM_RED) { returner[playerid] = true; returnedR = true; Returned(playerid); DestroyPickup(rFlag); } } return 1; } //Guys help me please this code is wrong. If pickupid == rFlag. It runs the code of if pickupid == bFlag;