Help need
#1

I have a command /towcar when i write /towcar 1 for car 1 is working but when i write /towcar 2 for car 2 is saying: UNKNOW COMMAND
PHP код:
CMD:tracteaza(playeridparams[])
{
    new 
string[144];
    new 
CARID;
    if(
GetPlayerMoney(playerid) < 10) return SendClientMessage(playerid, -1"Nu ai indeajuns bani!");
    if(
sscanf(params"u"CARID)) return SendClientMessage(playerid, -1"{FF0000}Folosire: /tracteaza [MASINA(1-2)]");
    if(
P_Data[playerid][pCar1] == && P_Data[playerid][pCar2] == 0) return SendClientMessage(playerid, -1"Nu ai masina!");
    if(
CARID 3) return 1;
    if(
CARID == 1)
    {
        if(
P_Data[playerid][pCar1] == 1)
        {
            foreach(
Playeri)
            {
                if(
IsPlayerInVehicle(imasina[playerid]) == 1) return SendClientMessage(playerid, -1"Masina in folosinta!");
            }
            
DestroyVehicle(masina[playerid]);
            
masina[playerid] = CreateVehicle(P_Data[playerid][pCarID1], P_Data[playerid][pCarX1],  P_Data[playerid][pCarY1],  P_Data[playerid][pCarZ1],  P_Data[playerid][pCarR1],  P_Data[playerid][pCarColor11],  P_Data[playerid][pCarColor21], -1);
            
P_Data[playerid][pCarKey1] = masina[playerid];
            
format(stringsizeof(string), "%s a fost tractat la locul de parcare!"VehicleNames[P_Data[playerid][pCarID1]-400]);
            
SendClientMessage(playerid, -1string);
        }
    }
    if(
CARID == 2)
    {
        if(
P_Data[playerid][pCar2] == 1)
        {
            foreach(
Playeri)
            {
                if(
IsPlayerInVehicle(imasina2[playerid]) == 1) return SendClientMessage(playerid, -1"Masina in folosinta!");
            }
            
DestroyVehicle(masina2[playerid]);
            
masina2[playerid] = CreateVehicle(P_Data[playerid][pCarID2], P_Data[playerid][pCarX2],  P_Data[playerid][pCarY2],  P_Data[playerid][pCarZ2],  P_Data[playerid][pCarR2],  P_Data[playerid][pCarColor12],  P_Data[playerid][pCarColor22], -1);
            
P_Data[playerid][pCarKey2] = masina2[playerid];
            
format(stringsizeof(string), "%s a fost tractat la locul de parcare!"VehicleNames[P_Data[playerid][pCarID2]-400]);
            
SendClientMessage(playerid, -1string);
        }
    }
    return 
1;

Reply


Messages In This Thread
Help need - by andreistalker - 17.08.2015, 07:33
Re: Help need - by Mariciuc223 - 17.08.2015, 07:41
Re: Help need - by DaniceMcHarley - 17.08.2015, 09:05
Re: Help need - by ZToPMaN - 17.08.2015, 09:06

Forum Jump:


Users browsing this thread: 1 Guest(s)