what's wrong?
#1

What's wrong with this command?
Код:
if(strcmp("/work", cmdtext, true, 10) == 0)
	{
	    new string[200];
		new pvehiclemodel = GetVehicleModel(GetPlayerVehicleID(playerid));
		if(PlayerInfo[playerid][pWorking] == 0)
		{
			if(pvehiclemodel == 592)
			{
			    if(PlayerInfo[playerid][pFlyLicense] > 0)
			    {
			    	new rand = random(sizeof(FlyingMissionRandom));
			    	CreatePlayerMission(playerid, FlyingMissionRandom[rand][UseTrailerCheck], FlyingMissionRandom[rand][MissionPay], FlyingMissionRandom[rand][loadx], FlyingMissionRandom[rand][loady], FlyingMissionRandom[rand][loadz], FlyingMissionRandom[rand][unloadx], FlyingMissionRandom[rand][unloady], FlyingMissionRandom[rand][unloadz]);
					format(string, sizeof(string), "%s", FlyingMissionRandom[rand][MissionName]);
					SendClientMessage(playerid, COLOR_YELLOW, string);
					PlayerInfo[playerid][pWorking] = 3;
				}
				else
				{
				    SendClientMessage(playerid, COLOR_RED, "You don't have a flying license");
				    RemovePlayerFromVehicle(playerid);
				}
			}
			else if(pvehiclemodel == 403 || pvehiclemodel == 514 || pvehiclemodel == 515)
			{
			    if(IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
			    {
			    	new rand = random(sizeof(TruckingMissionRandom));
			    	CreatePlayerMission(playerid, TruckingMissionRandom[rand][UseTrailerCheck], FlyingMissionRandom[rand][MissionPay], TruckingMissionRandom[rand][loadx], TruckingMissionRandom[rand][loady], TruckingMissionRandom[rand][loadz], TruckingMissionRandom[rand][unloadx], TruckingMissionRandom[rand][unloady], TruckingMissionRandom[rand][unloadz]);
			    	format(string, sizeof(string), "%s", FlyingMissionRandom[rand][MissionName]);
			    	SendClientMessage(playerid, COLOR_YELLOW, string);
			    	PlayerInfo[playerid][pWorking] = 2;
				}
				else
				{
				    SendClientMessage(playerid, COLOR_RED, "You don't have a trailer attached.");
				}
			}
			else if(pvehiclemodel == 525)
			{
				PlayerInfo[playerid][pWorking] = 1;
				SendClientMessage(playerid, COLOR_YELLOW, "You are now a tow trucker");
			}
			else
			{
			    SendClientMessage(playerid, COLOR_RED, "You can't work on this vehicle.");
			}
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You are already working");
		}
		return 1;
	}
If i'm in the airplane, it just sets a mission, but when i am in a truck or something, it sais: SERVER: Unknown command
Reply


Messages In This Thread
what's wrong? - by breakpaper - 07.07.2011, 09:29
Re: what's wrong? - by (SF)Noobanatior - 07.07.2011, 09:50
Re: what's wrong? - by breakpaper - 07.07.2011, 10:31
Re: what's wrong? - by Shadoww5 - 07.07.2011, 13:45

Forum Jump:


Users browsing this thread: 2 Guest(s)