Quantcast
Channel: SA-MP Forums
Viewing all articles
Browse latest Browse all 18226

A command not working....

$
0
0
Hello sampers!
I'm have a command:
Code:

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:
Code:

VehInfo[vehid][Km]
as this example:
Code:

[411]Infernuss(Km:47)
Thanks!

Viewing all articles
Browse latest Browse all 18226

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>