Help with Simple Cmd
#1

I use ppc Cmds so here is One of them:
pawn Код:
CMD:announce(playerid,params[])
{
if (APlayerData[playerid][LoggedIn] == true)
{
if (APlayerData[playerid][PlayerLevel] >= 1)
{
if(isnull(params)) return SendClientMessage(playerid,-1,"/announce text");
GameTextForAll(params,5000,3);
}
}
return 1;
}
If u helped me Rep +
Reply
#2

try it like this
pawn Код:
CMD:announce(playerid, params[])
{
    new text[64];
    if(isnull(text)) return SendClientMessage(playerid,-1,"/announce text");
    if(APlayerData[playerid][PlayerLevel] < 1) return SendClientMessage(playerid, -1, "You are not admin.");
   
    GameTextForAll(text, 5000, 3);
    return 1;
}
Reply
#3

use this
Код:
// ANN
COMMAND:ann(playerid, params[])
{
	// Send the command to all admins so they can see it
	SendAdminText(playerid, "/ann", params);

	// Check if the player has logged in
	if (APlayerData[playerid][LoggedIn] == true)
	{
		// Check if the player's admin-level is at least 1
		if (APlayerData[playerid][PlayerLevel] >= 1)
		{
                        GameTextForAll(params,4000,3);
		}
		else	
                    return 0;	    
	}
	else
	    return 0;

	// Let the server know that this was a valid command
	return 1;
}
PHP код:
this cmd is not made by me,someone gave me i also used it n it works 
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)