>>BITTE NUR LEUTE POSTEN DIE AHNUNG HABEN<<
Das ist eher eine Aufgabe für Leute wie InternetInk, DogZone, DMA, Einstein, BFX etc. und solche Leute die Ahnung haben denke ich da es sehr schwer ist.
Da ich nicht gut im Scripten bin bitte leicht erklären oder fertig per FS oder in einem Blank Gamemode. Danke im Vorraus leider kein Geld mehr aufm PayPal Konto sonst würde ich dafür Geld zahlen.
Würde gerne das bleim Clicken auf einen Spieler in der Liste wenn man "Tab" drückt bei einem Doppelklickt durch die Funtkion "OnPlayerCklickPlayer" das man den Spieler durch den Doppelklick anruft.
Und zweite bitte das wenn man ein Doppelklick auf den Spielernamen macht kommt ein Menü mit "SmS" und "Call" wenn man SmS auswählt soll man in einer Dialog Menü box den Text eingeben OHNE Nummer einzuegeben und dann auf Senden Button um dem Spieler die Nachricht zu senden wie eine Normale SmS und beim Call das man ihn wenn man im Menü Call auswählt und auf den Button weiter das man ihn anruft OHNE Nummer eingeben zu müssen. Doch der Anruf/Die SmS soll wenn der andere Spieler /togphone drine hat geblockt werden...
Die OnPlayerClockPlayer Funktion auf der alles abgespielt werden soll:
public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
return 1;
}
Die Call Funktion zur Information:
if(strcmp(cmd, "/call", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: /call [phonenumber]");
return 1;
}
if(PlayerInfo[playerid][pPnumber] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont't have a cell phone !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes out a cellphone.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new phonenumb = strval(tmp);
if(phonenumb == 911)
{
SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type /hangup to hang up");
SendClientMessage(playerid, COLOR_ALLDEPT, "EMERGENCY: Which Service Do You Require, Police or Paramedic?");
Mobile[playerid] = 911;
return 1;
}
if(phonenumb == PlayerInfo[playerid][pPnumber])
{
SendClientMessage(playerid, COLOR_GRAD2, " You just get a busy tone...");
return 1;
}
if(Mobile[playerid] != 255)
{
SendClientMessage(playerid, COLOR_GRAD2, " You are already on a call...");
return 1;
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid; //caller connecting
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " That players Phone is Offline !");
return 1;
}
if (Mobile[giveplayerid] == 255)
{
format(string, sizeof(string), "Your Mobile is Ringing Type (/Pickup) CallerID: %s", sendername);
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
RingTone[giveplayerid] = 10;
format(string, sizeof(string), "* %s's phone begins to ring.", sendername);
SendClientMessage(playerid, COLOR_WHITE, "HINT: You now use T to talk on your cellphone, type /hangup to hang up");
ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
CellTime[playerid] = 1;
return 1;
}
}
}
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, " You just get a Busy tone...");
}
return 1;
}
Die SmS Funktion zur Information:
if(strcmp(cmd, "/txt", true) == 0 || strcmp(cmd, "/t", true) == 0 || strcmp(cmd, "/sms", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/t)ext [phonenumber] [text chat]");
return 1;
}
if(PlayerInfo[playerid][pPnumber] == 0)
{
SendClientMessage(playerid, COLOR_GRAD2, " You dont't have a cell phone...");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s takes out a cellphone.", sendername);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new phonenumb = strval(tmp);
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/t)ext [phonenumber] [text chat]");
return 1;
}
if(phonenumb == 555)
{
if ((strcmp("yes", result, true, strlen(result)) == 0) && (strlen(result) == strlen("yes")))
{
SendClientMessage(playerid, COLOR_WHITE, "Text Message Delivered.");
if (gTeam[playerid] == 2 || gTeam[playerid] == 1)
{
SendClientMessage(playerid, COLOR_YELLOW, "SMS: I have no idea what you're talking about, Sender: MOLE (555)");
RingTone[playerid] = 20;
return 1;
}
return 1;
}
else
{
SendClientMessage(playerid, COLOR_YELLOW, "SMS: A simple Yes will do, Sender: MOLE (555)");
RingTone[playerid] = 20;
return 1;
}
}
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(PlayerInfo[i][pPnumber] == phonenumb && phonenumb != 0)
{
giveplayerid = i;
Mobile[playerid] = giveplayerid; //caller connecting
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline[giveplayerid] > 0)
{
SendClientMessage(playerid, COLOR_GREY, " That players Phone is Offline !");
return 1;
}
format(string, sizeof(string), "SMS: %s, Sender: %s (%d)", result,sendername,PlayerInfo[playerid][pPnumber]);
GetPlayerName(giveplayerid, sendername, sizeof(sendername));
//format(string, sizeof(string), "* %s's phone beeps.", sendername);
RingTone[giveplayerid] =20;
SendClientMessage(playerid, COLOR_WHITE, "Text Message Delivered");
SendClientMessage(giveplayerid, COLOR_YELLOW, string);
SendClientMessage(playerid, COLOR_YELLOW, string);
format(string, sizeof(string), "~r~$-%d", txtcost);
GameTextForPlayer(playerid, string, 5000, 1);
GivePlayerMoney(playerid,-txtcost);
SBizzInfo[2][sbTill] += txtcost;
ExtortionSBiz(2, txtcost);
PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
Mobile[playerid] = 255;
return 1;
}
}
}
}
}
SendClientMessage(playerid, COLOR_GRAD2, " Message Delivery Failed...");
}
return 1;
}
Die Togphone Funktion zur Information:
if(strcmp(cmd, "/togphone", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pDonateRank] > 0 || PlayerInfo[playerid][pAdmin] > 1)
{
if (!PhoneOnline[playerid])
{
PhoneOnline[playerid] = 1;
SendClientMessage(playerid, COLOR_GRAD2, " Your Phone is Offline !");
}
else if (PhoneOnline[playerid])
{
PhoneOnline[playerid] = 0;
SendClientMessage(playerid, COLOR_GRAD2, " Your Phone is Online !");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Not an Admin / Premium Account User !");
return 1;
}
}
return 1;
}