Was ist an demm stock falsch??
stock IsNumberOnline(Nummer)
{
new stop=0;
for(new i; i < MAX_PLAYERS && stop==0; i++)
{
if(IsPlayerConnected(i) && !IsPlayerNPC(i))
{
new HandyNummer=PlayerInfo[i][pHandyNummer];
if(HandyNummer == Nummer)
{
stop=1;
return i;
}
}
}
return 0;
}
Wenn ich eine von einen Spieler der online ist die nummer angebe kommt immer die nummer ist nich online
hir mal ein befehl:
ocmd:call(playerid, params[])
{
new Nummer,pID;
if(sscanf(params,"d",Nummer)) return SendClientMessage(playerid,Gelb,"[Benutze]: /call [Nummer]");
if(Tallking[playerid] == 1) return SendClientMessage(playerid,Rot,"Du bist schon im Gespräch.!");
if(! IsNumberOnline(Nummer))return SendClientMessage(playerid,Rot,"Die angegebene Nummer ist nicht Online!");
if(CheckNumber(Nummer) == 0) return SendClientMessage(playerid,Rot,"Die angegebene nummer gibt es nicht.!");
if(pID == playerid) return SendClientMessage(playerid,Rot,"Du kannst dich nicht selber anrufen!");
if(InCall[Nummer] == 1)
{
SendClientMessage(playerid,Rot,"The player had a conversation, a message that you tried to contact him was sent to him.");
formatEx(pID,Orange,"The player \"%s\" (%d) tried to reach you.",playerid,PlayerName(playerid));
return 1;
}
formatEx(playerid,Gelb,"Dial to \"%s\"...",PlayerName(pID));
formatEx(pID,Orange,"%s ruft dich an, um denn Anruf anzunehmen /pickup oder /p",PlayerName(playerid));
EndTimer[pID] = SetTimerEx("EndCall",30000,0,"iii",playerid,pID,1);
PlayerPlaySound(pID,1056,0.0,0.0,0.0);
TallkingID[playerid] = pID;
TallkingID[pID] = playerid;
IsCalling[playerid] = 1;
InCall[playerid] = 1;
InCall[pID] = 1;
return 1;
}