Really weird problem.
#1

Hi there -

trying to script a /admins command:

pawn Код:
dcmd_admins(playerid,params[])
{
    new adminstring[500],temps[64],tempname[24],dutystring[12];
    strins(adminstring,"Admin: Megan | Level: BOT | ON DUTY | ID: -1",0);

    for(new i=0; i<MAX_PLAYERS; i++)
  {
    if(aduty[i] == 0) format(dutystring,sizeof(dutystring),"Off duty");
    if(aduty[i] == 1) format(dutystring,sizeof(dutystring),"ON DUTY");
    if(PlayerInfo[i][Level] >= 2 && IsPlayerConnected(i))
    {
        GetPlayerName(i,tempname,sizeof(tempname));
        format(temps,sizeof(temps),"Admin: %s | Level: %d | %s | ID: %d",tempname,PlayerInfo[i][Level],dutystring,i);
        new leng = strlen(adminstring);
        strins(adminstring,temps,leng+1);
        }
  }
    return ShowPlayerDialog(playerid,4542,DIALOG_STYLE_LIST,"Admins online",adminstring,"Okay","Cancel");
}
Something must be wrong in here, If I only place ShowPlayerDialog it works, but if I place the whole command it returns "Unknown command"
Reply


Messages In This Thread
Really weird problem. - by Striker_Moe - 30.12.2009, 17:02
Re: Really weird problem. - by Striker_Moe - 30.12.2009, 17:05
Re: Really weird problem. - by Striker_Moe - 30.12.2009, 17:14
Re: Really weird problem. - by MadeMan - 30.12.2009, 17:41

Forum Jump:


Users browsing this thread: 1 Guest(s)