07.04.2017, 08:44
(
Последний раз редактировалось Loinal; 09.04.2017 в 07:17.
)
fixed
format( string, 128, "%s (ID:%d) Level: [%d] (%s)\n\nTotal ZoneX admins %d", GetName( i ), i , pData[i][Admin] , admtext, count);
format( stringz , 128,"Online Admins");
..
format( stringz , 128 ,"No Admins Online ");
You should be using strcat instead of format in the following line inside the loop.
PHP код:
This is the function you should use: https://sampwiki.blast.hk/wiki/Strcat Also, you should erase the ShowPlayerDialog function from the loop, for logical reasons. As an extra, allow me to warn you that the following is totally pointless: PHP код:
|
format(string,sizeof string,"1");
format(string,sizeof string,"2");
format(string,sizeof string,"3");
printf("String: %s",string);
strcat(string,"1");
strcat(string,"2");
strcat(string,"3");
printf("String: %s",string);
format(string2,sizeof string,"1");
strcat(string,string2);
format(string2,sizeof string,"2");
strcat(string,string2);
format(string2,sizeof string,"3");
strcat(string,string2);
printf("String: %s",string); // will output String: 123
format( string, 1200, "%s (ID:%d) Level: [%d] (%s)\n\nTotal ZoneX admins %d", GetName( i ), i , pData[i][Admin] , admtext, count);
format( string, sizeof(string), "%s (ID:%d) Level: [%d] (%s)\n\nTotal ZoneX admins %d", GetName( i ), i , pData[i][Admin] , admtext, count);
new string[128],stringz[128],newStringOs[70];
format(newStringOs, sizeof newStringOs, "%s (ID:%d) Level: [%d] (%s)\n", GetName( i ), i , pData[i][Admin] , admtext); // change the name of the string here to the new one and add a \n new line
strcat(string,newStringOs); //and concatenate them together
if(count >= 0)
{
format(newStringOs,sizeof newStringOs,"\nTotal ZoneX admins %d",count); // set the string with the deleted text
strcat(string,newStringOs); // add the removed text again at the end of the string
ShowPlayerDialog( playerid , 190 , DIALOG_STYLE_MSGBOX , stringz , string, "Ok" , "Close" );
}