Detaljan opis problema: Kako da napravim komandu /call u dialogu, da ne moram npr upisati /call BROJ nego kada upišem /call izbaci mi dialog input i tu upisem broj i onda pozove?
Dio skripte: Evo komanda /call
CMD:call(playerid, params[])
{
new string, phonenumb;
if(sscanf(params, "d", phonenumb)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: /call ");
if (PlayerInfo > 0)
{
SendClientMessageEx(playerid,COLOR_GREY,"Policija ti je privremeno oduzela telefon!.");
return 1;
}
if(PlayerTied != 0 || PlayerCuffed != 0)
{
SendClientMessageEx(playerid,COLOR_GREY,"Ruke su ti zavezane, mobitel ne mozes da koristis!.");
return 1;
}
if(PlayerInfo == 0)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Ti nemaš telefona!.");
return 1;
}
if(PhoneOnline > 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "Mobitel ti je iskljucen!.");
return 1;
}
format(string, sizeof(string), "* %s vadi mobitel iz dzepa.", GetPlayerNameEx(playerid));
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
if(phonenumb == 911)
{
if(PlayerInfo == 4 || PlayerInfo == 1000)
{
SendClientMessageEx(playerid, COLOR_WHITE, "Nemozes koristit ovo kada si u admin zatvoru!");
return 1;
}
SendClientMessageEx(playerid, COLOR_WHITE, "[BD:RP]: Koristi T da pricas, da prekines upisi /hangup.");
SendClientMessageEx(playerid, COLOR_ALLDEPT, "HITAN SLUCAJ: Koga zelite nazvati, police ili paramedic?");
Mobile = 911;
return 1;
}
if(phonenumb == PlayerInfo)
{
SendClientMessageEx(playerid, COLOR_GRAD2, " Zauzeto...");
return 1;
}
if(Mobile != INVALID_PLAYER_ID)
{
SendClientMessageEx(playerid, COLOR_GRAD2, " Ti vec obavljas poziv...");
return 1;
}
foreach(Player, i)
{
if(PlayerInfo == phonenumb && phonenumb != 0)
{
new giveplayerid = i;
Mobile = giveplayerid; //caller connecting
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(PhoneOnline > 0)
{
SendClientMessageEx(playerid, COLOR_GREY, "Birani pretplatnik je iskljucio svoj mobitel.");
Mobile = INVALID_PLAYER_ID;
return 1;
}
if(Mobile != INVALID_PLAYER_ID)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Zauzeto...");
Mobile = INVALID_PLAYER_ID;
return 1;
}
if(Spectating!=0)
{
SendClientMessageEx(playerid, COLOR_GRAD2, "Zauzeto...");
Mobile = INVALID_PLAYER_ID;
return 1;
}
if (Mobile == INVALID_PLAYER_ID)
{
format(string, sizeof(string), "Tvoj mobitel zvoni - upisi /p da se javis. [Pozivaoc: %s]", GetPlayerNameEx(playerid));
SendClientMessageEx(giveplayerid, COLOR_YELLOW, string);
RingTone = 10;
format(string, sizeof(string), "* %s's telefon pocinje zvoniti.", GetPlayerNameEx(i));
SendClientMessageEx(playerid, COLOR_WHITE, "[BD:RP]: Koristi T da pricas, da prekines upisi /hangup.");
ProxDetector(30.0, i, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
new Float:rX, Float:rY, Float:rZ;
GetPlayerPos(giveplayerid, rX, rY, rZ);
SendAudioToRange(6802, 100, 0, rX, rY, rZ, 30.0);
SendAudioToPlayer(playerid, 6148, 100, 0);
CellTime = 1;
return SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USECELLPHONE);
}
}
}
}
}
SendClientMessageEx(playerid, COLOR_GRAD2, "Tvoj poziv NE MOZE biti obavljen, provjerite broj i pokusajte ponovo...");
return 1;
}
Neke slike/video za lakse dobivanje pomoci(neobavezno): //