26.03.2013, 14:02
Today I learned how to use strcat, example:
pawn Код:
CMD:cmds(playerid,params[])
{
new string[1024];
new longstring[1024];
format(string, sizeof(string),"/kill - Suicide\n/car - Spawns a car\n/tcar - Spawns a pre-tuned car\n/fix - Fix a car\n/nos - Add nitrous on your car\n");
strcat(longstring,string,sizeof(longstring));
format(string, sizeof(string),"/xnos - Remove nitrous from your car\n/godcar - Make the car god\n/teles - Teleports\n/updates - Check the current update\n/website - Our forum!\n");
strcat(longstring,string,sizeof(longstring));
format(string, sizeof(string),"/gps - Find the player\n/setmytime - Set your time\n/radio - Play radio\n/music - Play music\n/stop - Stop everything that you're playing\n");
strcat(longstring,string,sizeof(longstring));
format(string, sizeof(string),"/pc - Parachute\n/respawn - Respawn\n/antifall - Toggle Antifall\n/autofix - Toggle Autofix\n/god - Toggle GodMode");
strcat(longstring,string,sizeof(longstring));
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "Commands", longstring, "OK", "");
return 1;
}