Issue with sscanf
#3

Try this:

Code:
dcmd_incar(playerid,params[])
{
	if(PlayerInfo[playerid][Level] >= 2)
	{
		new Driver,Seat,Passenger;

		if (!sscanf(params,"uud",Driver,Passenger,Seat))
		{
			new VehDr,VehPas;
			VehDr = GetPlayerVehicleID(Driver);
			VehPas = GetPlayerVehicleID(Passenger);
			
			if (VehDr>0)
			{
				PutPlayerInVehicle(VehDr,VehPas,Seat);
				return 1;
			}
			else
			{
			    SendClientMessage(playerid,0xFF0000FF, "Error: Please specify a drive thats actually in a vehicle!");
			    return 1;
			}
		}
		SendClientMessage(playerid,0xFF0000FF, "Usage: \"/incar <PlayerID Driver> <PlayerID Passenger> <Seat>\"");
		return 1;
	}
	SendClientMessage(playerid,0xFF0000FF, "Error: You have to be level 2 to use this command!");
	return 1;
}
Reply


Messages In This Thread
Issue with sscanf - by Warlock - 28.07.2010, 12:40
Re: Issue with sscanf - by Warlock - 29.07.2010, 07:27
Re: Issue with sscanf - by Kyosaur - 29.07.2010, 07:45
Re: Issue with sscanf - by Warlock - 04.08.2010, 05:25
Re: Issue with sscanf - by JaTochNietDan - 04.08.2010, 05:34
Re: Issue with sscanf - by Danny - 04.08.2010, 09:24
Re: Issue with sscanf - by JaTochNietDan - 04.08.2010, 15:10
Re: Issue with sscanf - by DRIFT_HUNTER - 04.08.2010, 16:01
Re: Issue with sscanf - by Daren_Jacobson - 04.08.2010, 16:28

Forum Jump:


Users browsing this thread: 1 Guest(s)