06.06.2017, 02:26
(
Последний раз редактировалось NealPeteros; 06.06.2017 в 04:40.
)
What I want to do: List all 911 calls, and assign each of them into a dialog
PHP код:
new calls9110[200][5];
new calls9111[200][5];
new calls9112[200][5];
new calls9113[200][5];
new calls9114[200][5];
PHP код:
for(new i=0; i<10; i++)
{
if(isNull(calls9110[i]))
{
format(calls9110[i], 300, "|_______________911 Call_______________|");
break;
}
}
for(new i=0; i<10; i++)
{
if(isNull(calls9111[i]))
{
format(calls9111[i], 300, "Caller: %s Phone: %i Call Trace: %s",GetName(playerid), PlayerInfo[playerid][pNumber], szZone);
break;
}
}
for(new i=0; i<10; i++)
{
if(isNull(calls9112[i]))
{
format(calls9112[i], 300, "Services Required: SJPD");
break;
}
}
for(new i=0; i<10; i++)
{
if(isNull(calls9113[i]))
{
format(calls9113[i], 300, "Location: %s", text);
break;
}
}
for(new i=0; i<10; i++)
{
if(isNull(calls9114[i]))
{
format(calls9114[i], 300, "Situation: %s", PlayerCrime[playerid][SituationStr]);
break;
}
}
PHP код:
new holder[500], string2[200];
format(string2, sizeof(string2), "%s\n", calls9110[0]);
strcat(holder, string2, sizeof(holder));
format(string2, sizeof(string2), "%s\n", calls9111[0]);
strcat(holder, string2, sizeof(holder));
format(string2, sizeof(string2), "%s\n", calls9112[0]);
strcat(holder, string2, sizeof(holder));
format(string2, sizeof(string2), "%s\n", calls9113[0]);
strcat(holder, string2, sizeof(holder));
format(string2, sizeof(string2), "%s\n", calls9114[0]);
strcat(holder, string2, sizeof(holder));
ShowPlayerDialog(playerid, DIALOG_MDC_911_CALLS, DIALOG_STYLE_MSGBOX, "MDC Police - Page 0", holder, "Next Page", "Cancel");