if(strcmp(cmd, "/mycars", true) == 0)
{
if(AccountInfo[playerid][Vehicule] == 0) return SCM(playerid, ERROR, "Nu ai nici-un vehicul !");
for(new i=1;i<buyablecars;i++)
{
if(strcmp(VehInfo[i][Propietar], name, true) == 0)
{
new string[MAX_STRING];
GetVehicleName(i);
format(string,sizeof(string), "Model-> %s, ID: %d, Kilometrii: %.1f",VehicleNames[GetVehicleModel(i)-400],VehInfo[i][Model], VehInfo[i][Km]);
SCM(playerid,COLOR_YELLOW,string);
format(string,sizeof(string), "Vehicule: %d | Sloturi pentru vehicule: %d", AccountInfo[playerid][Vehicule], AccountInfo[playerid][MaxVeh]);
SCM(playerid,COLOR_YELLOW,string);
}
else if(VehInfo[i][Km] <= 0)
{
return GivePlayerMoney(playerid, 0);
}
}
return 1;
}
|
Please try to explain it more, i can't really understand anything.
|
public OnPlayerCommandText(playerid, cmdtext[])
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
|
If you have #include ZCMD on top of your script then change
PHP код:
PHP код:
|