Issue with sscanf
#5

Simple mistake with the code he posted

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

        if (!sscanf(params,"uud",Driver,Passenger,Seat))
        {
            new VehDr = GetPlayerVehicleID(Driver);
           
            if (IsPlayerInAnyVehicle(Driver))
            {
                PutPlayerInVehicle(Passenger,VehDr,Seat);
            }
            else
            {
                SendClientMessage(playerid,0xFF0000FF, "Error: Please specify a driver that's 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;
}
He was putting the passengers vehicle ID in the drivers vehicle ID, which wouldn't work as you might imagine
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)