Jump to content

Bug comanda [/clear]


Recommended Posts

Salut tuturor , am si eu o problema pot spune la comanda [/clear] am server de samp si am primit foarte multe reclamati la comanda [/clear] am incercat sa rezolva problema dar nu o pot rezolva nu inteleg de ce pana acum nu am avut probleme in script nu sunt un scripter bun sunt incepator dar am mai furat si eu meserie de colo colo si ... pana acum de cand scriptez nu am avut problema la script 

In ce consta problema de ex ma fac duty si ii dau cuiva dupa server wanted , faza este ca , cateodata i se sterg stelele cateodata nu , si cand i se sterg si incearca sa foloseasca de ex comanda /fly nu merge spunand ca are wanted si cand da un relog si revin pe sv i se pun stelele la loc.

Vreau sa mentionez ca folosesc gamemode-ul Saints 

Comanda este : 

CMD:clear(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
         if(IsACop(playerid))
        {
            new tmpcar = GetPlayerVehicleID(playerid);
            if(IsACopCar(tmpcar) || IsANgCar(tmpcar) || IsAFbiCar(tmpcar) || PlayerToPoint(10.0,playerid,1762.0028,-1584.4185,1742.5264) || PlayerToPoint(10.0,playerid,253.9323,69.7215,1003.6406) || PlayerToPoint(10.0,playerid,229.4171,167.4609,1003.0234)  || PlayerToPoint(10.0,playerid,187.8352,1931.4265,17.6874))
            {
                new id,string[128],giveplayer[30],sendername[30];
                if(sscanf(params, "u", id)) return SCM(playerid,COLOR_WHITE,"{B8DBFF}Syntax: /clear <Name/Playerid>");
                {
                    if(IsPlayerConnected(id))
                    {
                        if(id != INVALID_PLAYER_ID)
                          {
                            if(id == playerid) return SendClientMessage(playerid, COLOR_WHITE, "You cannot clear yourself.");
                            GetPlayerName(id, giveplayer, sizeof(giveplayer));
                            GetPlayerName(playerid, sendername, sizeof(sendername));
                            format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s.", giveplayer);
                             SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* Officer %s has cleared your Records and Wanted Points.", sendername);
                            SendClientMessage(id, COLOR_LIGHTBLUE, string);
                            format(string, sizeof(string), "* %s has cleared %s's Records and Wanted Points.", sendername, giveplayer);
                            SendTeamMessage(3, COLOR_LIGHTBLUE, string);
                            SendTeamMessage(2, COLOR_LIGHTBLUE, string);
                            SendTeamMessage(1, COLOR_LIGHTBLUE, string);
                            WantedPoints[id] = 0;
                            WantedLevel[id] = 0;
                            SetPlayerWantedLevel(id, 0);
                            ClearCrime(id);
                            format(string,sizeof(string),"UPDATE users SET `WantedLevel`='0' WHERE `name`='%s'",sendername, giveplayer);
                            mysql_query(SQL,string);
                            Update(id,pWantedLevelx);
                        }
                    }
                    else
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "{FFFFCC}Error: Player not connected.");
                    }
                }
             }
            else
            {
                SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You are to not inside the Police Station or in Police vehicle.");
            }
        }
        else
        {
            SendClientMessage(playerid, COLOR_WHITE, "{FFB870}You are not an Cop/FBI/National Guard.");
        }
    }
    return 1;
}

 

Update(id,pWantedLevelx); - asta am adaugato eu nu avea comanda asta si inca ceva daca incercati sa imi spuneti sa adaug giveplayerid la SetPlayerWantedLevel(id, 0); adica SetPlayerWantedLevel(giveplayerid, 0); imi da erroare cu text sa definesc giveplayerid nuj cum asta.

Am nev de ajutor va rog frumos.Ofer plusuri tot ce vreti .. numai ajutatima.Multumesc frumos pentru timpul acordat

Link to comment
Share on other sites

  • 2 weeks later...

Schimbă din:

format(string,sizeof(string),"UPDATE users SET `WantedLevel`='0' WHERE `name`='%s'",sendername, giveplayer);

în:

format(string,sizeof(string),"UPDATE users SET `WantedLevel`='0' WHERE `name`='%s'", giveplayer);

 

Spune-mi dacă merge.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.