Command Help [REP ++]
#1

Hi All.I need help with the my command.

I maked command to set a admin panel password but now i should to put a Numbers.I want to make it with charachters ? How to make that ?

pawn Код:
//------------------------------------------------------------------------------
    if(strcmp(cmd, "/setapw", true) == 0)
    {
        if (PlayerInfo[playerid][pAdmin] >= 1337)
        {
            if(IsPlayerConnected(playerid))
            {
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "{37F906}INFO:{FFFFFF}/setapw [ID/Ime na Igrac] [pw]");
                    return 1;
                }
                giveplayerid = ReturnUser(tmp);
                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp))
                {
                    SendClientMessage(playerid, COLOR_GRAD1, "{37F906}INFO:{FFFFFF}/setapw [ID/Ime na Igrac] [pw]");
                    return 1;
                }
//              new playa;
//              playa = ReturnUser(tmp);
                moneys = strval(tmp);
                PlayerInfo[giveplayerid][pAdminPw] = moneys;
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                GetPlayerName(playerid, sendername, sizeof(sendername));
                format(string, sizeof(string),"{37F906}INFO:{FFFFFF}Admin %s ti namesti %d lozinka na Admin Panel.",sendername,moneys);
                SendClientMessage(giveplayerid, COLOR_WHITE, string);
                format(string, sizeof(string),"{37F906}INFO:{FFFFFF}Mu namestivte %d Admin Password, na %s za Admin Panel.",moneys,giveplayer);
                SendClientMessage(playerid, COLOR_WHITE, string);
                SacuvajIgraca(giveplayerid);
            }
        }
        else
        {
           SCM(playerid, WHITE,"{FF4040}GRESKA:{FFFFFF}Ne ste ovlasteni za Ovaa Komanda.");
           return 1;
        }
        return 1;
    }
Reply
#2

try this

PHP код:
//------------------------------------------------------------------------------
    
if(strcmp(cmd"/setapw"true) == 0)
    {
        if (
PlayerInfo[playerid][pAdmin] >= 1337)
        {
            if(
IsPlayerConnected(playerid))
            {
                
tmp strtok(cmdtextidx);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"{37F906}INFO:{FFFFFF}/setapw [ID/Ime na Igrac] [pw]");
                    return 
1;
                }
                
giveplayerid ReturnUser(tmp);
                
tmp strtok(cmdtextidx);
                if(!
strlen(tmp))
                {
                    
SendClientMessage(playeridCOLOR_GRAD1"{37F906}INFO:{FFFFFF}/setapw [ID/Ime na Igrac] [pw]");
                    return 
1;
                }
                new 
moneys[256];
                
moneys strtok(cmdtext,idx);
                
format(PlayerInfo[giveplayerid][pAdminPw], sizeof(PlayerInfo[giveplayerid][pAdminPw]), "%s"moneys);
                
GetPlayerName(giveplayeridgiveplayersizeof(giveplayer));
                
GetPlayerName(playeridsendernamesizeof(sendername));
                
format(stringsizeof(string),"{37F906}INFO:{FFFFFF}Admin %s ti namesti %s lozinka na Admin Panel.",sendername,moneys);
                
SendClientMessage(giveplayeridCOLOR_WHITEstring);
                
format(stringsizeof(string),"{37F906}INFO:{FFFFFF}Mu namestivte %s Admin Password, na %s za Admin Panel.",moneys,giveplayer);
                
SendClientMessage(playeridCOLOR_WHITEstring);
                
SacuvajIgraca(giveplayerid);
            }
        }
        else
        {
           
SCM(playeridWHITE,"{FF4040}GRESKA:{FFFFFF}Ne ste ovlasteni za Ovaa Komanda.");
           return 
1;
        }
        return 
1;
    } 
Reply
#3

Show me a erors in line format(PlayerInfo[giveplayerid][pAdminPw], sizeof(PlayerInfo[giveplayerid][pAdminPw]), "%s", moneys); - Indifener - ... Help
Reply
#4

Fast Helppp :@@
Reply
#5

Not when you bump, double-post and DEMAND things. We're volunteers - not workers. We don't get paid to help you and we don't appreciate being ordered about.
Reply
#6

I fixed alone
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)