Custom Made Phone system, saying un-existent number. :S
#2

Ow my f*cking god...

pawn Код:
for (new i = 0; i < MAX_PLAYERS; i++)
            {
                if(PlayerInfo[i][PhoneNumber] == number)
                {
                    SendClientMessage(i, COLOR_YELLOWGREEN, "Your phone is beeping, /pickup too pickup the call or /hangup if you are not willing to pickup.");
                    PlayerInfo[playerid][Call] = number;
                    PlayerInfo[i][Call] = PlayerInfo[playerid][PhoneNumber];
                    return 1;
                }
REMOVE the return 1 INSIDE THE LOOP.

15th time I tell you this,

Also, use this:

pawn Код:
new acount = 0;
           for (new i = 0; i < MAX_PLAYERS; i++)
            {
                if(PlayerInfo[i][PhoneNumber] == number)
        {
            acount++;
                }
    }
if(acount > 0)
{
      if(PlayerInfo[i][PhoneNumber] == number)
        {
            SendClientMessage(i, COLOR_YELLOWGREEN, "Your phone is beeping, /pickup too pickup the call or /hangup if you are not willing to pickup.");
            PlayerInfo[playerid][Call] = number;
            PlayerInfo[i][Call] = PlayerInfo[playerid][PhoneNumber];
            return 1;
        }
}
else
{
 THA MESSAGE FOR NOT EXISTING
        {
        {
To see if somebody has that number, otherwise it will return the message for every player
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)