help strcat - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: help strcat (
/showthread.php?tid=557242)
help strcat -
AgusZ - 13.01.2015
why (Hey) not showing ?
Код:
CMD:credits( playerid, params[ ] )
{
new strtext[900];
new string[128];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName,sizeof(pName));
strcat(string, "Hey/n");
strcat(string, "\n");
strcat(string, "\n");
format(string, 128, "***your name %s.", pName);
strcat(strtext, string);
ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "{F81414}Credits", strtext, "Ok", "");
PlayerPlaySound(playerid, 1183, 0, 0, 0);
return 1;
}
Respuesta: help strcat -
JuanStone - 13.01.2015
A string for the final format and another for the local format, perhaps that is the mistake, even-i have my doubts because the format you've done in the end, this should work.
pawn Код:
CMD:credits(playerid, params[])
{
new string[55], format[39], pName[24];
GetPlayerName(playerid, pName, 24);
format(format, sizeof(format), "***your name %s.", pName);
strcat(string, "Hey\n");
strcat(string, "\n");
strcat(string, "\n");
strcat(string, format);
ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "{F81414}Credits", string, "Ok", "");
PlayerPlaySound(playerid, 1183, 0, 0, 0);
return true;
}
Re: help strcat -
Threshold - 13.01.2015
pawn Код:
CMD:credits(playerid, params[])
{
new string[55], pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
format(string, sizeof(string), "Hey\n\n\n***your name %s.", pName);
ShowPlayerDialog(playerid, DIALOG_CREDITS, DIALOG_STYLE_MSGBOX, "{F81414}Credits", string, "Ok", "");
PlayerPlaySound(playerid, 1183, 0, 0, 0);
return true;
}
...
Re: help strcat -
CalvinC - 13.01.2015
There's no reason to use strcat, just put it in the format.