SA-MP Forums Archive
What is problem with this command? - 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: What is problem with this command? (/showthread.php?tid=647597)



What is problem with this command? - Longover - 07.01.2018

Hello sampers!
I'm have a command:
Код:
dcmd_mycars(playerid, params[])
{
    #pragma unused params
    new name5r[30];
	GetPlayerName(playerid, name5r, 30);
    if(IsPlayerConnected(playerid))
    if(AccountInfo[playerid][Vehicule] == 0) return SCM(playerid, ERROR, "Nu ai nici-un vehicul!");
    for(new i=1;i<MAX_VEHICLES;i++)
	if(strcmp(VehInfo[i][Propietar], name5r, true) == 0)
	{
 		if(VehInfo[i][Valoare] == 1)
		{
		new string[126];
		format(string, sizeof(string), "[%d]%s", GetVehicleModel(i)+3, VehicleNames[GetVehicleModel(i)-397]);
		SCM(playerid, yellow, string);
		format(string, sizeof(string), "{FFFF00}Vehicule: {0000FF}%d/{FF0000}%d", AccountInfo[playerid][Vehicule], AccountInfo[playerid][MaxVeh]);
		SCM(playerid, yellow, string);
		SCM(playerid, COLOR_LIGHTCYAN, "Daca doresti mai multe sloturi scrie comanda /SHOP.");
		}
		else if(VehInfo[i][Valoare] == 0)
		{
		GivePlayerMoney(playerid, 0);
		}
	}
	return 1;
}
but when i'm try to type this command not work
AND, I'm need to put km in : [%d]%s
Variable is:
Код:
VehInfo[vehid][Km]
as this example:
Код:
[411]Infernuss(Km:47)
Thanks!