[Hopfully Solved] Unknown command
#1

Код:
new Float:HousesCoords[13][3] = {
{222.9534, 1287.7649, 1082.1406},  // Sml - 1 bedroom
{261.0827, 1284.6899, 1080.2578},  // Sml - 1 bedroom
{260.6734, 1237.7909, 1084.2578},  // Sml - 1 bedroom
{376.7426, 1417.3226, 1081.3281},  // Sml - 1 bedroom
{295.2874, 1473.2769, 1080.2578},  // Med - 2 bedroom
{2270.1050, -1210.3917, 1047.5625}, // Med - 2 bedroom
{327.9431, 1478.3801, 1084.4375},  // Med - 2 bedroom
{447.1211, 1397.8444, 1084.3047},  // Med - 2 bedroom
{2196.0063, -1204.6326, 1049.0234}, // Lrg - 3 bedroom
{235.3416, 1187.2882, 1080.2578},  // Lrg - 3 bedroom
{490.9987, 1399.4164, 1080.2578},  // Lrg - 3 bedroom
{227.1212, 1114.1840, 1080.9972},  // Lrg - 4 bedroom
{225.6624, 1022.5345, 1084.0145}  // Xlrg - 4 bedrooms
};

dcmd_exit(playerid,params[]) {
	#pragma unused params
	if(IsPlayerConnected(playerid) && PLAYERLIST_authed[playerid] == 1){
		for(new h = 0; h <= MAX_HOUSES; h++)
		{
		  if(PlayerToPoint(3.0, playerid, HousesCoords[HouseInfo[h][hLevel]][0], HousesCoords[HouseInfo[h][hLevel]][1], HousesCoords[HouseInfo[h][hLevel]][2]))
			{
			  TeleportPlayer(playerid, HouseInfo[h][hExitX], HouseInfo[h][hExitY], HouseInfo[h][hExitZ], 0, 0, 0);
              return 1;
			}
		}
	}
	return true;
}

stock TeleportPlayer(playerid, Float:x,Float:y,Float:z, Interior, VehTele, Vworld)
{
	if(IsPlayerConnected(playerid)){
		new car = GetPlayerVehicleID(playerid);
		if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT) { SetPlayerPos(playerid, x,y,z); SetPlayerVirtualWorld(playerid, Vworld); }
		if( VehTele == 1) {
			if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER) { SetVehiclePos(car, x,y,z); SetVehicleVirtualWorld(car, Vworld); }
			}
		SetPlayerInterior(playerid, Interior); }
	return true;
}
I am having a problem with my dcmd_exit command i believe. When i try /exit and i am not over the coordinated it returns Unknown Command. But when i am over the coordinates i dont get the error it just teleports me to were i wanna go.
Reply


Messages In This Thread
[Hopfully Solved] Unknown command - by kevin974 - 29.08.2009, 23:10
Re: [HELP] Unknown command - by Correlli - 29.08.2009, 23:13
Re: [HELP] Unknown command - by kevin974 - 29.08.2009, 23:59
Re: [HELP] Unknown command - by Correlli - 30.08.2009, 00:02
Re: [HELP] Unknown command - by kevin974 - 30.08.2009, 00:25
Re: [HELP] Unknown command - by kevin974 - 30.08.2009, 11:48
Re: [HELP] Unknown command - by EirikhO - 30.08.2009, 11:51
Re: [HELP] Unknown command - by kevin974 - 30.08.2009, 13:01
Re: [HELP] Unknown command - by EirikhO - 30.08.2009, 13:56
Re: [HELP] Unknown command - by kevin974 - 30.08.2009, 14:11

Forum Jump:


Users browsing this thread: 1 Guest(s)