17.05.2012, 06:50
Try this:
I've never tried this script, As in Mobiles.
But obviously, My try up above might be wrong but...
Good luck if that doesn't work out.
pawn Код:
else if(strcmp(cmd, "pickup", true) == 0)
{
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_LIGHTRED, "ERROR: You are already on a call...");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(Mobile[i] == playerid)
{
Mobile[playerid] = i; //caller connecting
SendClientMessage(i, COLOR_WHITE, "PHONE: Call picked up.");
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s answers his cellphone.", sendername);
SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
ProxDetector(30.0, playerid, string,
RingTone[playerid] = 0;
}
}
}
}
But obviously, My try up above might be wrong but...
Good luck if that doesn't work out.