SA-MP Forums Archive
Why won't this command work - 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: Why won't this command work (/showthread.php?tid=230308)



Why won't this command work - yarrum3 - 23.02.2011

Frist time i have try something like this i get no errors im just trying to make it so that i do /impound and it will just re spawn the car im towing.

Код:
	if(strcmp(cmd, "/impound", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(IsATOWTRUCKDRIVER(playerid))
			{
				if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
				{
				    new vid;
				    GetVehicleTrailer(vid);
				    DestroyVehicle(vid);
				 }
			}
		}
		return 1;
	}



Re: Why won't this command work - (SF)Noobanatior - 23.02.2011

missed a line
pawn Код:
if(strcmp(cmd, "/impound", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsATOWTRUCKDRIVER(playerid))
            {
                if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                {
                    new vid;
                    vid = GetPlayerVehicleID(playerid);
                    GetVehicleTrailer(vid);
                    DestroyVehicle(vid);
                 }
            }
        }
        return 1;
    }
}



Re: Why won't this command work - yarrum3 - 23.02.2011

Quote:
Originally Posted by (SF)Noobanatior
Посмотреть сообщение
missed a line
pawn Код:
if(strcmp(cmd, "/impound", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(IsATOWTRUCKDRIVER(playerid))
            {
                if (IsTrailerAttachedToVehicle(GetPlayerVehicleID(playerid)))
                {
                    new vid;
                    vid = GetPlayerVehicleID(playerid);
                    GetVehicleTrailer(vid);
                    DestroyVehicle(vid);
                 }
            }
        }
        return 1;
    }
}
How did i