18.02.2011, 02:38
Hey guys, the wiki wasn't very clear on how i merge all the strings together and was just asking if somebody could explain it more.
strcat - https://sampwiki.blast.hk/wiki/Strcat
strcat - https://sampwiki.blast.hk/wiki/Strcat
pawn Код:
command(mycars,playerid,params[])
{
for(new i=1;i<MAX_VEHICLES;i++)
{
if(strmatch(VehicleInfo[i][Owner],GetName(playerid)))
{
new Float:x,Float:y,Float:z;
GetVehiclePos(i,x,y,z);
new string[100];
strcat(string, "%s\n",VehicleNames[VehicleInfo[i][Model]-400]);
strcat(string, "%s\n",VehicleNames[VehicleInfo[i][Model]-400]);
strcat(string, "%s",VehicleNames[VehicleInfo[i][Model]-400]);
ShowPlayerDialog(playerid, MYCARS, DIALOG_STYLE_LIST, "Your vehicles", string, "Locate", "Exit");
}
}
return 1;
}