10.07.2011, 20:15
pawn Код:
IsDialing[MAX_PLAYERS]; // When typing Call command.
IsCalling[MAX_PLAYERS]; // When remote Id answers.
command(call, playerid, params[])
{
new string[128], pID;
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, 0x0, "Usage : /call [ Player Name / ID ]");
if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, 0x0, "This player is not connected");
if(IsDialing[playerid] != -1) return SendClientMessage(playerid, 0x0, "You are already dialing someone!");
IsDialing[playerid] = pID;
format(string, sizeof(string), "%s is calling you, type /answer to answer", GetName(playerid));
SendClientMessage(pID, 0x0, string);
format(string, sizeof(string), "You are now dialing %s", GetName(pID));
return SendClientMessage(playerid, 0x0, string);
}