SA-MP Forums Archive
Stocking Problem ? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Stocking Problem ? (/showthread.php?tid=477139)



Stocking Problem ? - donhu789 - 22.11.2013

pawn Код:
stock CMDMessageToAdmins(playerid,command[])
{
    if(ServerInfo[AdminCmdMsg] == 0) return 1;
    new string[128]; new AdminCMD[500]; GetPlayerName(playerid,AdminCMD,sizeof(AdminCMD));
    format(string,sizeof(string),"(Admin) '%s' (Level: %d) | Command: %s", AdminCMD, PlayerInfo[AdminCMD][Level], command);
    return MessageToAdmins(yellow,string);
}
Guys please see what wrong with my code

please help +REP +REP +REP


Re: Stocking Problem ? - Konstantinos - 22.11.2013

Would you mind to be more specific? Doesn't it work correct? What kind of problem did you find?

First of all, change AdminCMD's size from 500 to 24.

You didn't post MessageToAdmins too in case there's something wrong in it.

Other than those above, it seems fine.


Re: Stocking Problem ? - donhu789 - 23.11.2013

ok Leeme try


Re: Stocking Problem ? - donhu789 - 23.11.2013

can you just fixed for me because i'm kind of stupid of ScriptinG :\


Re: Stocking Problem ? - Jefff - 23.11.2013

pawn Код:
stock CMDMessageToAdmins(playerid,command[])
{
    if(ServerInfo[AdminCmdMsg] == 0) return 1;
    new string[144];
    new AdminName[MAX_PLAYER_NAME + 1];
    GetPlayerName(playerid,AdminName,MAX_PLAYER_NAME);
    format(string,sizeof(string),"(Admin) '%s' (Level: %d) | Command: %s", AdminName, PlayerInfo[playerid][Level], command);
    return MessageToAdmins(yellow,string);
}



Re: Stocking Problem ? - donhu789 - 23.11.2013

Ty Jefff