I have a problem with a command "/vehicle"
#1

Hello. I have a problem with my command "/vehicle".
In the past it was a command like this: /veh
And now when I try to type: /vehicle 411 3 3 it says this: "Invalid vehicle ID specified !(411 - 611)"
I really don't know what to do. So I hope you can help me
Here is the command:
PHP код:
    if(strcmp(cmd"/vehicle"true) == 0)
    {
        if(
IsPlayerConnected(playerid))
        {
            new 
car,color,color2;
            if(
PlayerInfo[playerid][pAdmin] == 10)
            {
                new 
length strlen(cmdtext);
                while ((
idx length) && (cmdtext[idx] <= ' '))
                {
                    
idx++;
                }
                new 
offset idx;
                new 
result[64];
                while ((
idx length) && ((idx offset) < (sizeof(result) - 1)))
                {
                    
result[idx offset] = cmdtext[idx];
                    
idx++;
                }
                
result[idx offset] = EOS;
                if(!
strlen(result))
                {
                    
SendClientMessage(playeridCOLOR_GRAD2"USAGE: /vehicul [model] [culoare1] [culoare2]");
                    return 
1;
                }
                if(
car 400 || car 611) return SendClientMessage(playerid,COLOR_GRAD2"Invalid vehicle ID specified !(411 - 611)");
                if(
color255 || color0) return SendClientMessage(playeridCOLOR_GRAD2"Car color ID's: 0-255");
                if(
color2255 || color20) return SendClientMessage(playeridCOLOR_GRAD2"Car color ID's: 0-255");
                if(
IsPlayerInAnyVehicle(playerid)) return RemovePlayerFromVehicle(playerid);
                new    
Float:XFloat:YFloat:ZFloat:A;
                
GetPlayerPos(playeridX,Y,Z);
                
GetPlayerFacingAngle(playerid,A);
                new 
carid CreateVehicle(carX,Y,Z,Acolorcolor2, -1);
                
PutPlayerInVehicle(playerid,carid0);
                
LinkVehicleToInterior(carid,GetPlayerInterior(playerid));
            }
            else return 
SendClientMessage(playeridCOLOR_GRAD2NOTADMIN);
        }
        return 
1;
    } 
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)