/asay help
#1

Help my admin message not working it shows name but not the message/params any help :S >>

Код:
CMD:asay(playerid, params[])
{
	if(pInfo[playerid][Level] < 2) return SendClientMessage(playerid,RED,">> You Must Be Level 2+ To Use This Command!");
    if(!strlen(params)) return SendClientMessage(playerid, RED, "USAGE: /asay [msg]");
	new string[24], pname[24];
    GetPlayerName(playerid, pname, 24);
	format(string, sizeof(string), ">> Admin %s Says: %s", pname, params);
	return SendClientMessageToAll(COLOR_LIGHTGREEN,string);
}
Reply
#2

pawn Код:
CMD:asay( playerid, params[ ] )
{
    new string[128], pname[MAX_PLAYER_NAME];
    if(pInfo[playerid][Level] < 2) return SendClientMessage(playerid,RED,">> You Must Be Level 2+ To Use This Command!");
    if(isnull(params)) return SendClientMessage(playerid, RED, "USAGE: /asay [msg]");
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(string, sizeof(string), ">> Admin %s Says: %s", pname, params);
    SendClientMessageToAll(COLOR_LIGHTGREEN,string);
    return 1;
}
Edit: your string arrays was too small, i guess.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)