28.05.2012, 13:41
Ow my f*cking god...
REMOVE the return 1 INSIDE THE LOOP.
15th time I tell you this,
Also, use this:
To see if somebody has that number, otherwise it will return the message for every player
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;
}
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
{
{

