SA-MP Forums Archive
[SOLVED]Why i get "Unknown Command"? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [SOLVED]Why i get "Unknown Command"? (/showthread.php?tid=133772)



[SOLVED]Why i get "Unknown Command"? - XRVX - 13.03.2010

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);
	}
}



Re: Why i get "Unknown Command"? - Correlli - 13.03.2010

You forgot to return 1 at the end of the command.


Re: Why i get "Unknown Command"? - XRVX - 13.03.2010

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

Thanks


Re: Why i get "Unknown Command"? - Correlli - 13.03.2010

You're welcome. =)