SA-MP Forums Archive
Help with Simple Cmd - 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: Help with Simple Cmd (/showthread.php?tid=374652)



Help with Simple Cmd - Geeboi_Mehdi - 03.09.2012

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 +


Re: Help with Simple Cmd - MarkoN - 03.09.2012

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;
}



Re: Help with Simple Cmd - shaniyal - 03.09.2012

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