Help Me Plz
#1

fixed
Reply
#2

doing this in a hurry so...
Код:
	if ( strcmp ( cmd , "/ban" , true ) == 0 && IsPlayerAdmin ( playerid ) )
	{
	    new tmp [ 256 ];

	    new message [ 256 ];

		tmp = strtok ( cmdtext , idx );

        if( ! strlen ( tmp ) )
		{
		    SendClientMessage ( playerid , GREY , "USAGE: /ban [playerid]" );
		    return 1;
	    }

	    new giveplayerid = strval(tmp);

	    tmp = strtok(cmdtext, idx);

        if(!strlen(tmp))
	    {
	        if (IsPlayerConnected(giveplayerid))
	        {
   	            format(string, sizeof(string), "Admin %s (player: %d) has banned %s (player: %d) from the server.",GetName(playerid), playerid, GetName(giveplayerid), giveplayerid);
	            SendClientMessageToAll(GREY, string);
                printf(string);
	            SendClientMessageToAll(GREY,"No reason given.");
                printf(string);
			    Ban(giveplayerid);
   	            return 1;
		    }
			else
			{
                format(string, sizeof(string), "[ERROR] ID %d is not an active player.", giveplayerid);
                SendClientMessage(playerid, GREY, string);
                return 1;
            }
        }

        if(giveplayerid < 10)
        {
		    strmid ( message , cmdtext , 6 , strlen ( cmdtext ) );
        }
		else
		{
            strmid ( message , cmdtext , 7 , strlen ( cmdtext ) );
        }

   	    if (IsPlayerConnected(giveplayerid))
	    {
            format(string, sizeof(string), "Admin %s (player: %d) has banned %s (player: %d) from the server.",GetName(playerid), playerid, GetName(giveplayerid), giveplayerid);
		    SendClientMessageToAll(GREY, string);
			printf(string);
		    format(string, sizeof(string), "reason: %s.",message);
		    SendClientMessageToAll(GREY, string);
            printf(string);
			Ban(giveplayerid);
			return 1;
	    }
		else
		{
            format(string, sizeof(string), "[ERROR] ID %d is not an active player.", giveplayerid);
            SendClientMessage(playerid, GREY, string);
            return 1;
        }
	}
and for 6.) try a streamer
Reply
#3

k first
thx for the /ban cmd
but my question was how to make somthing only for admins/vips
like the cmd:

if(IsPlayerAdmin(playerid))

but want to set this cmd to lvl
i mean like a ban will be for lvl 3 and kick will be for lvl 2
(for the vips 2)

and
do u have a good plugins for loading objects?
Reply
#4

Do you have a liable VIP system?
Reply
#5

nope
Reply
#6

fixed
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)