[SOLVED]Why i get "Unknown Command"?
#1

When I use /car it gives SERVER: Unknown Command. Whats the problem

Код:
dcmd_car(playerid,params[]) {
#pragma unused params
	new Float:CarX,Float:CarY,Float:CarZ,Float:CarAngle;
	SendClientMessage(playerid,COLOR_GREEN,"You has spawned an new car (VID:411)");
	if(IsPlayerInAnyVehicle(playerid))
	{
		new VehCmd, car;
		VehCmd=GetPlayerVehicleID(playerid);
		DestroyVehicle(VehCmd);
 		GetPlayerPos(playerid,CarX,CarY,CarZ);
		GetPlayerFacingAngle(playerid,CarAngle);
		car=CreateVehicle(411, CarX, CarY, CarZ, CarAngle, -1, -1, -1);
		PutPlayerInVehicle(playerid,car,0);
		}
	else
		{
		new carcar;
 		GetPlayerPos(playerid,CarX,CarY,CarZ);
		GetPlayerFacingAngle(playerid,CarAngle);
		carcar=CreateVehicle(411, CarX, CarY, CarZ, CarAngle, -1, -1, -1);
		PutPlayerInVehicle(playerid,carcar,0);
	}
}
Reply
#2

You forgot to return 1 at the end of the command.
Reply
#3

Quote:
Originally Posted by Don Correlli
You forgot to return 1 at the end of the command.
Ahh those returns

Thanks
Reply
#4

You're welcome. =)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)