Jump to content
  • 0

Question

Posted

am incercat sa fac o comanda pentru admini care stau afk si comanda functioneaza perfect numai ca de fiecare data cand o scot imi ea o litera din nume

am facut eu ceva gresit sau nu ruleaza bine

if(PlayerInfo[playerid][pAdmin] >= 4)

            {
                GetPlayerName(playerid,sendername,sizeof(sendername));
                if(!AFK[playerid])
                {

                    format(string,sizeof string,"Admin-ul %s este acum AFK.",sendername);
                    SendClientMessageToAll(0xD86F41FF,string);
                    strins(sendername,"[AFK]",strlen(sendername));
                    SetPlayerName(playerid,sendername);
                    AFK[playerid] = true;
                }
                else if(AFK[playerid])
                {
                    SetPlayerHealthEx(playerid, 150);
                    format(string,sizeof string,"Admin-ul %s este acum Online.",sendername);
                    SendClientMessageToAll(0x967BCEFF,string);
                    strdel(sendername, strlen(sendername)-6,strlen(sendername));
                    SetPlayerName(playerid,sendername);
                    AFK[playerid] = false;
                }
            }

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

2 answers to this question

Recommended Posts

  • 0
  • Administrator
Posted

Da, ai pus -6 acolo, dar tu ai 5 caractere. Pune -5.

strlen(sendername)-6

 

  • Upvote 1
  • 0
Posted
Acum 1 oră, WopsS a spus:

Da, ai pus -6 acolo, dar tu ai 5 caractere. Pune -5.


strlen(sendername)-6

 

Multumesc, nu mam mai gandit ca ma poate afecta  chesta asta 

La multi ani si un an nou plin cu bucurii Va doresc!

  • Upvote 1

FiveGame  Lands

Pawno Developer, Mapping , Scripter

Since 2016

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.