Jump to content
  • 0

Problema Clear


d@rK

Question

Cand dau /clear unui player , merge, ii sterge wantedul acelui player, DAR la /stats ramane tot wanted 10/10 .... :|

[pawn]if(strcmp(cmd, "/clear", true) == 0)

{

    if(IsPlayerConnected(playerid))

  {

new member = PlayerInfo[playerid][pMember];

new leader = PlayerInfo[playerid][pLeader];

new rank = PlayerInfo[playerid][pRank];

if(gTeam[playerid] == 2)

{

if (!PlayerToPoint(3.0, playerid, 253.9280,69.6094,1003.6406))

{

SendClientMessage(playerid, COLOR_GRAD2, "You are to not inside the Police Station!");

return 1;

}

tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /clear [playerid/PartOfName]");

return 1;

}

giveplayerid = ReturnUser(tmp);

if(IsPlayerConnected(giveplayerid))

{

    if(giveplayerid != INVALID_PLAYER_ID)

    {

                        if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Clear yourself!"); return 1; }

    GetPlayerName(giveplayerid, 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_WHITE, string);

format(string, sizeof(string), "* Officer %s has cleared your Records and Wanted Points.", sendername);

SendClientMessage(giveplayerid, COLOR_WHITE, string);

WantedPoints[giveplayerid] = 0;

WantedLevel[giveplayerid] = 0;

ClearCrime(giveplayerid);

if(gTeam[giveplayerid]==4)

{

    gTeam[giveplayerid] = 3;

    SetPlayerToTeamColor(giveplayerid);

}

}

}

else

{

SendClientMessage(playerid, COLOR_GREY, "Invalid ID/Name!");

}

}

else if(member == 6||leader == 6)

{

    tmp = strtok(cmdtext, idx);

if(!strlen(tmp))

{

SendClientMessage(playerid, COLOR_GRAD1, "USAGE: /clear [playerid/PartOfName]");

return 1;

}

giveplayerid = ReturnUser(tmp);

if(IsPlayerConnected(giveplayerid))

{

    if(giveplayerid != INVALID_PLAYER_ID)

    {

        if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "You cannot Clear yourself!"); return 1; }

    if(rank < 4) { SendClientMessage(playerid, COLOR_GREY, "You need Rank 4 to clear someone's Wanted Points + Records !"); return 1; }

    if(GetPlayerCash(playerid) < 5000) { SendClientMessage(playerid, COLOR_GREY, "You need $5000 to Clear your Family Member !"); return 1; }

                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));

GetPlayerName(playerid, sendername, sizeof(sendername));

    if(member > 0)

    {

    if(PlayerInfo[giveplayerid][pMember] != member)

{

SendClientMessage(playerid, COLOR_GREY, "That player is not in your Family !");

return 1;

}

format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s for $5000.", giveplayer);

SendClientMessage(playerid, COLOR_WHITE, string);

format(string, sizeof(string), "* Family Member %s with Rank %d, has cleared your Records and Wanted Points.", sendername, rank);

SendClientMessage(giveplayerid, COLOR_WHITE, string);

}

else if(leader > 0)

{

                if(PlayerInfo[giveplayerid][pMember] != leader)

{

SendClientMessage(playerid, COLOR_GREY, "That player is not in your Family !");

return 1;

}

    format(string, sizeof(string), "* You cleared the Records and Wanted Points of %s for $5000.", giveplayer);

SendClientMessage(playerid, COLOR_WHITE, string);

format(string, sizeof(string), "* Family Leader %s, has cleared your Records and Wanted Points.", sendername);

SendClientMessage(giveplayerid, COLOR_WHITE, string);

}

WantedPoints[giveplayerid] = 0;

WantedLevel[giveplayerid] = 0;

ClearCrime(giveplayerid);

GivePlayerCash(playerid, - 5000);

}

}

else

{

SendClientMessage(playerid, COLOR_GREY, "Invalid ID/Name!");

}

}

else

{

    SendClientMessage(playerid, COLOR_GREY, "You are not an Cop / SRI / Armata Romana / Family Member !");

}

}

return 1;

}[/pawn]

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Esti sigur ca exista o legatura intre /clear si stats?Deoarece nu gasesc nimic.Am gasit doar asta,ceea ce e bine:

[pawn] WantedPoints[giveplayerid] = 0;

WantedLevel[giveplayerid] = 0;

ClearCrime(giveplayerid);

GivePlayerCash(playerid, - 5000);[/pawn]

Eu zic sa stergi de la /stats wanted,oricum nu prea e important.

Link to comment
Share on other sites

Pai, eu as dorii sa fie la /stats in caz ca un COP ataca un player aiurea sa verific daca chiar are wanted sau nu...

Ai putea sa ma ajuti? Nu stiu sa fac legatura intre stats si clear ... Te rog :o3

Da,o sa iti dau Y!M-ul meu prin PM,acum sunt obosit,vorbim maine.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • 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.