PDA

View Full Version : Need help :: /call


Aprezt
03/09/2011, 04:31 PM
Hello.
I am need help whit cellphone when i write /call Example: /call 954123 and i say Hello i got this:
Check CHAT:
http://www.upload.ee/image/1632219/call.jpg

And i got OnPlayerText code

public OnPlayerText(playerid, text[])
{
new sendername[MAX_PLAYER_NAME];
new string[256];
new tmp[256];
if(Telefonigar22kimas[playerid] != 255)
{
new idx;
tmp = strtok(text, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s (Räägib telefoniga): %s", sendername, (text));
ProxDetector(20.0, playerid, string,HALL,HALL,HALL,HALL,HALL);
format(string, sizeof(string), "Helistaja: %s",(text));
SendClientMessage(playerid, HELEKOLLANE, string);

if(IsPlayerConnected(Telefonigar22kimas[playerid]))
{
if(Telefonigar22kimas[Telefonigar22kimas[playerid]] == playerid)
{
SendClientMessage(Telefonigar22kimas[playerid], HELEKOLLANE,string);
}
}
return 1;
}
if (tekst)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
format(string, sizeof(string), "%s ütleb: %s",RPNimi(playerid), text);
ProxDetector(20.0, playerid, string,HALL,HALL,HALL,HALL,HALL);
return 0;
}
return 1;
}



WHO HELP I WILL BE ADD A REP !

whitedragon
03/09/2011, 05:26 PM
public OnPlayerText(playerid, text[])
{
new sendername[MAX_PLAYER_NAME];
new string[256];
new tmp[256];
if(Telefonigar22kimas[playerid] != 255)
{
new idx;
tmp = strtok(text, idx);
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s (Räägib telefoniga): %s", sendername, (text));
ProxDetector(20.0, playerid, string,HALL,HALL,HALL,HALL,HALL);
format(string, sizeof(string), "Helistaja: %s",(text));
SendClientMessage(playerid, HELEKOLLANE, string); // Send client message about what? Caller?

if(IsPlayerConnected(Telefonigar22kimas[playerid]))
{
if(Telefonigar22kimas[Telefonigar22kimas[playerid]] == playerid) // WTF??? Show us /call command also
{
SendClientMessage(Telefonigar22kimas[playerid], HELEKOLLANE,string);
}
}
return 0;
}
if (tekst)
{
if(gPlayerLogged[playerid] == 0)
{
return 0;
}
format(string, sizeof(string), "%s ütleb: %s",RPNimi(playerid), text);
ProxDetector(20.0, playerid, string,HALL,HALL,HALL,HALL,HALL);
return 0;
}
return 1;
}

Can't wait /call command