sscanf error
#2

pawn Код:
CMD:changeplate(playerid, params[])
{
    if(Player_Data[playerid][Donator] == 0)
    {
        return SCM(playerid, RED, "You need to have atleast Donator level 1 for this command.");
    }
    else
    {
        if(GetPlayerState(playerid != PLAYER_STATE_DRIVER))
        {
            return SCM(playerid, RED, "You need to be in a vehicle to change it's numberplate.");
        }
        else
        {
            new VehID = GetPlayerVehicleID(playerid), stringnplate[8];

            if(sscanf(params, "s[8]", stringnplate)) return SCM(playerid, GREY, "[SERVER]: Usage: /changeplate [NUMBER/WORD COMBINATION] - Maximum 8 numbers/letters");
            if(strlen(stringnplate) < 1 || strlen(stringnplate) > 8)
            {
                SCM(playerid, GREY, "[SERVER]: ERROR: Your numberplate must be be between 1 and 8 characters");
            }
            else
            {
                SetVehicleNumberPlate(VehID, stringnplate);
                SetVehicleToRespawn(VehID);
                PutPlayerInVehicle(playerid, VehID, 0);
                return 1;
            }
                }
    }
    return 1;
}
Reply


Messages In This Thread
sscanf error - by Duck4coder - 30.01.2014, 16:32
Re: sscanf error - by ProjectMan - 30.01.2014, 16:41
Re: sscanf error - by Duck4coder - 30.01.2014, 16:51
Re: sscanf error - by ProjectMan - 30.01.2014, 17:00
Re: sscanf error - by Konstantinos - 30.01.2014, 17:07
Re: sscanf error - by Duck4coder - 30.01.2014, 17:07

Forum Jump:


Users browsing this thread: 1 Guest(s)