sscanf probelms, pls help
#1

sscanf problems with me now
1- when i use /i (id) some times work some times crash the whole server and closes and console
2- when it work it send unkown command but the command is responding....

the code:

pawn Код:
InfoFunction(playerid, params[])
{
    new ID;
    if(sscanf(params, "ius", ID)) SendClientMessage(playerid, BLANCO, "USAGE: /info(/i) [ID]");
    else if(ID == INVALID_PLAYER_ID) SendClientMessage(playerid, ROJO, "Player is not connected!");
    else
    {
pawn Код:
TextDrawShowForPlayer(playerid,PlayerInfo2);
        TextDrawShowForPlayer(playerid,PlayerLocationetc);
        new carid = GetPlayerVehicleID(ID);
        new zone[MAX_ZONE_NAME], string[100], name[50];
        GetPlayer2DZone(playerid, zone, MAX_ZONE_NAME);
        GetPlayerName(ID,name,MAX_PLAYER_NAME+1);
        new Float:X, Float:Y, Float:Z;
        GetPlayerPos(ID, X, Y, Z);
        if(!IsPlayerInAnyVehicle(ID) && SInfo[ID][pDonator] == 0 && SInfo[ID][pRegular] == 0)
        {
            if(civilianteam[ID]==1 || ciateam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(playerid, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(armyteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Army ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(copteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Cop ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Medic ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            if(medicteam[ID]==0 && copteam[ID]==0 && armyteam[ID]==0 && ciateam[ID]==0 && civilianteam[ID]==0)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~NONE ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~'LCTRL/LMB' ~w~For Hide The~n~~w~Player Info!",5000,3);
        }
       
        else if(IsPlayerInAnyVehicle(ID) && SInfo[ID][pDonator] == 0 && SInfo[ID][pRegular] == 0)
        {
            if(civilianteam[ID]==1 || ciateam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(armyteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Army ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(copteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Cop ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z),  GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Medic ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==0 && copteam[ID]==0 && armyteam[ID]==0 && ciateam[ID]==0 && civilianteam[ID]==0)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~NONE ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LALT ~w~To Hide The~n~~w~Player Info!",5000,3);
        }
       

        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
       
        if(!IsPlayerInAnyVehicle(ID) && SInfo[ID][pDonator] == 0 && SInfo[ID][pRegular] == 1)
        {
            if(civilianteam[ID]==1 || ciateam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(playerid, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(armyteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Army ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(copteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Cop ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Medic ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==0 && copteam[ID]==0 && armyteam[ID]==0 && ciateam[ID]==0 && civilianteam[ID]==0)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~NONE ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~'LCTRL/LMB' ~w~For Hide The~n~~w~Player Info!",5000,3);
        }
       
        else if(IsPlayerInAnyVehicle(ID) && SInfo[ID][pDonator] == 0 && SInfo[ID][pRegular] == 1)
        {
            if(civilianteam[ID]==1 || ciateam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(armyteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Army ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(copteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Cop ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z),  GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Medic ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==0 && copteam[ID]==0 && armyteam[ID]==0 && ciateam[ID]==0 && civilianteam[ID]==0)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~NONE ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LALT ~w~To Hide The~n~~w~Player Info!",5000,3);
        }
       
        /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
       
        if(!IsPlayerInAnyVehicle(ID) && SInfo[ID][pDonator] == 1 && SInfo[ID][pRegular] == 1)
        {
            if(civilianteam[ID]==1 || ciateam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(playerid, X, Y, Z), GetPlayerWantedLevel(ID));
                GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LMB ~w~For Hide The~n~~w~Player Info!",5000,3);
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(armyteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Army ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LMB ~w~For Hide The~n~~w~Player Info!",5000,3);
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(copteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Cop ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LMB ~w~For Hide The~n~~w~Player Info!",5000,3);
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Medic ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LMB ~w~For Hide The~n~~w~Player Info!",5000,3);
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==0 && copteam[ID]==0 && armyteam[ID]==0 && ciateam[ID]==0 && civilianteam[ID]==0)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~NONE ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LMB ~w~For Hide The~n~~w~Player Info!",5000,3);
                TextDrawSetString(PlayerLocationetc,string);
            }
            GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~'LCTRL/LMB' ~w~For Hide The~n~~w~Player Info!",5000,3);
        }
       
        else if(IsPlayerInAnyVehicle(ID) &&  SInfo[ID][pDonator] == 1 && SInfo[ID][pRegular] == 1)
        {
            if(civilianteam[ID]==1 || ciateam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(armyteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Army ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(copteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Cop ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z),  GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Medic ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==0 && copteam[ID]==0 && armyteam[ID]==0 && ciateam[ID]==0 && civilianteam[ID]==0)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~NONE ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Regular Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LALT ~w~To Hide The~n~~w~Player Info!",5000,3);
        }
       
        ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
       
        if(!IsPlayerInAnyVehicle(ID) && SInfo[ID][pDonator] == 1 && SInfo[ID][pRegular] == 0)
        {
            if(civilianteam[ID]==1 || ciateam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(playerid, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(armyteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Army ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(copteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Cop ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~Medic ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==0 && copteam[ID]==0 && armyteam[ID]==0 && ciateam[ID]==0 && civilianteam[ID]==0)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~NONE ~n~~g~Team: ~w~NONE ~n~~g~Speed: ~w~0 MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~'LCTRL/LMB' ~w~For Hide The~n~~w~Player Info!",5000,3);
        }
       
        else if(IsPlayerInAnyVehicle(ID) && SInfo[ID][pDonator] == 1 && SInfo[ID][pRegular] == 0)
        {
            if(civilianteam[ID]==1 || ciateam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Civilian ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(armyteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~w~%d ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Army ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(copteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Cop ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z),  GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==1)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~Medic ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            else if(medicteam[ID]==0 && copteam[ID]==0 && armyteam[ID]==0 && ciateam[ID]==0 && civilianteam[ID]==0)
            {
                format(string, 256, "~n~          ~b~~h~%s (%d)~n~~n~~g~Location: ~w~%s ~n~~g~Distance: ~w~%d Feet ~n~~g~Wanted Level: ~w~%d ~n~~g~Vehicle: ~w~%s ~n~~g~Team: ~w~NONE ~n~~g~Speed: ~w~%d MPH ~n~~n~~b~Normal Player/Donator Player", name, ID, zone, GetPlayerDistanceFromPoint(ID, X, Y, Z), GetPlayerWantedLevel(ID),VehicleNames[GetVehicleModel(carid)-400], GetPlayerSpeed(ID));
                TextDrawSetString(PlayerLocationetc,string);
            }
            GameTextForPlayer(playerid,"~n~    ~w~Press ~r~~h~LALT ~w~To Hide The~n~~w~Player Info!",5000,3);
        }
    }
    return 1;
}

command(i, playerid, params[])
{
    return InfoFunction(playerid, params);
}
heeelp pls
Reply
#2

pawn Код:
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, BLANCO, "USAGE: /info(/i) [ID]");
pawn Код:
i = integer
u = Player and NPC's name/ID
s = string
You're using only one parameter which is ID, so "u". The rest of what you did, they aren't used. You haven't got a string and in your case, I wouldn't recomment "i".
Reply
#3

Quote:
Originally Posted by Dwane
Посмотреть сообщение
pawn Код:
if(sscanf(params, "u", ID)) return SendClientMessage(playerid, BLANCO, "USAGE: /info(/i) [ID]");
pawn Код:
i = integer
u = Player and NPC's name/ID
s = string
You're using only one parameter which is ID, so "u". The rest of what you did, they aren't used. You haven't got a string and in your case, I wouldn't recomment "i".
ok i kept only "u"

problem 1 solved = no crash
now problem 2 no, it giving me unkown command but its working
Reply
#4

Don't forgot return 1;
Reply
#5

Quote:
Originally Posted by MouseBreaker
Посмотреть сообщение
Don't forgot return 1;
there is return 1;
Reply
#6

What do you use? ZCMD? If yes you should remove OnPlayerCommandText() in your script
Reply
#7

there is no OnPlayerCommandText On My Commands

Only /i is telling unkown command and working because sscanf problem in "u" i must add something in it but i don't know wht
Reply
#8

lol its stell crashing when i do /i sometimes -_-
Reply
#9

Is InfoFunction a custum function you made?
Delete the "return 1;" from it and if it doesn't say that this function should return a value, try it.
It sometimes says "SERVER: Unknown command" because there is double return 'value'.
Reply
#10

dwayne add me on skype and msn

skype: goldzoro
msn: mahmoud130213@hotmail.com

sorry for putting it here, because u dont accept pm's
pls add me dwayne
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)