Jump to content
  • 0

Ajutor comenzi de admin pe srv de stunt.


kamikazee

Question

Cum pot pune comenzile specifice adminilor de la rakn1 la 1339 adica Owner, sa pun comenzile de exemplu: /makeadmin    sau /mute sau  /setheal  si toate car emai sunt? va rog sa ma ajutati ca am si eu un server de STUNT aproape gata asta mai e singura problema cu care ma cofrunt. Va rog sa ma ajutati daca stiti si se poate.

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

pai la fiecare comanda

if ( P_DATA [ playerid ] [ P_LEVEL ] < 1 ) ( sau depinde ce ai ) schimbi 1 cu level-ul dorit :)

de ex


if( P_DATA [ playerid ] [ P_LEVEL ] == 1339 ) return SendClientMessage( playerid, COLOR_RED, "Nu ai permisiunea sa folosesti aceasta comanda! ");

Daca playerul nu are level 1339 nu poate folosi comanda :)

communitylogosml.png

94.23.120.101:7778

Link to comment
Share on other sites

Va rog imi spuneti la care linie trebuiesc puse comenzile de admin? Sau merg puse pe ori ce linie? Va rog sa imi raspunedeti. Multumesc anticipat dau +1 respect de la mn

pai sa-ti dau un exemplu de comanda de admin din GM-ul meu :)

CMD:kick( playerid, params[ ] )
{
	new
		m_gString   [ 256 ],
		g_aString   [ 256 ],
		pName       [  24 ],
		oName       [  24 ],
		pIP         [  50 ],
		Reason      [ 256 ],
		P_ID
	;
    new year, month, date; getdate(year, month, date);
	new hour, minute, second; gettime(hour, minute, second);

	if( pData [ playerid ] [ pAdmin ] < 1 )
	                    return SendError( playerid, "You are not authorized to use this command! ");

	if( sscanf ( params, "is[256]", P_ID, Reason ) )
	                    return SendUsage( playerid, "/kick [id] [reason] ");

	if( P_ID == playerid )
	                    return SendError( playerid, "You cannot kick yourself! ");

	GetPlayerName( playerid, pName, sizeof ( pName ) );
	GetPlayerName( P_ID, oName, sizeof ( oName ) );
	GetPlayerIp( P_ID, pIP, sizeof ( pIP ) );

	format( m_gString, sizeof ( m_gString ), ">> %s (ID: %d) has kicked %s (ID: %d) for: %s ", pName, playerid, oName, P_ID, Reason );
	SendClientMessageToAll( COLOR_ORANGE, m_gString );

	format( m_gString, sizeof ( m_gString ), "(ModMsg) %s (ID: %d) has kicked %s (ID: %d) for: %s (IP: %s) ", pName, playerid, oName, P_ID, Reason, pIP );
	SendModMsg( COLOR_YELLOW, m_gString );

	SendClientMessage( playerid, -1,        "");
	format( g_aString, sizeof ( g_aString ), ">> You have been kicked, write down this informations: ");
	SendClientMessage( playerid, COLOR_ORANGE, g_aString );
	format( g_aString, sizeof ( g_aString ), ">> Admin: %s (ID: %d) ", pName, playerid );
	SendClientMessage( playerid, COLOR_YELLOW, g_aString );
	format( g_aString, sizeof ( g_aString ), ">> Reason: %s", Reason );
	SendClientMessage( playerid, COLOR_YELLOW, g_aString );
	format( g_aString, sizeof ( g_aString ), ">> Date: %d/%d/%d ", year, month, date );
	SendClientMessage( playerid, COLOR_YELLOW, g_aString );
	format( g_aString, sizeof ( g_aString ), ">> Time: %d/%d/%d ", hour, minute, second );
	SendClientMessage( playerid, COLOR_YELLOW, g_aString );
	format( g_aString, sizeof ( g_aString ), ">> IP: %s", pIP );
	SendClientMessage( playerid, COLOR_YELLOW, g_aString );
	format( g_aString, sizeof ( g_aString ), "If you think it was wrongfully, take a screenshot and complain at our forum. ");
	SendClientMessage( playerid, COLOR_ORANGE, g_aString );
	SendClientMessage( playerid, COLOR_ORANGE, "Our forum can be found at: ......");

	Kick ( P_ID );
	return 1;
}

communitylogosml.png

94.23.120.101:7778

Link to comment
Share on other sites

deci atata trebuie sa scriu pentur o comanda? o.O cam mult dar tot nu mi-ati rapsuns la intrebarea:  Pe care linie trebuie pusa comanda, sau merge pe ori ce linie? Te rog daca imi poti raspunde la intrebarea asta ar fi super.

E clar ca nu stii nimic.

Ti-am aratat unde se pune functia care verifica level-ul de admin. Nu se pune pe o linie exacta, se pune dupa CMD:blabal( playerid, params[ ] ) ... :)

communitylogosml.png

94.23.120.101:7778

Link to comment
Share on other sites

CMD: ... este pentru procesorul de comenzi zcmd.

Depinde ce procesor de comenzi ai, banuiesc ca folosesti GF ..


if(strcmp(cmdtext, "/blabal", true ) == 0 )
{
 if( P_DATA [ playerid ] [ P_LEVEL ] < 1 ) 
 si restul comenzii 
 return 1;
}

communitylogosml.png

94.23.120.101:7778

Link to comment
Share on other sites

Asa e bn cum am facut sau mai trebuie sa adaug cv? imi spuneti voi ce mai trebuie aduaugat dac anu e bine? 

                                                                                                                                                                              if(strcmp(cmdtext, "/makeadmin", true ) == 0 )

                                                                                                                                                                              if(IsPlayerAdmin[ playerid ] [ P_LEVEL ] < 1339 )

                                                                                                                                                                              return 1;

E bine sau trebuie facut altfel? va rog spunetimi cum trebuie facut. Multumesc!

Link to comment
Share on other sites

[pawn]public OnPlayerCommandText(playerid, cmdtext[])

{

    if(strcmp(cmdtext, "/test", true ) == 0 )

    {

        if(!IsPlayerAdmin(playerid))

        {

            SendClientMessage(playerid,0xFF0000AA,"Doar administratorii pot folosi aceasta comanda.");

            return 1;

        }

        // Codul tau.

        return 1;

}[/pawn]

Link to comment
Share on other sites

[pawn]public OnPlayerCommandText(playerid, cmdtext[])

{

    if(strcmp(cmdtext, "/test", true ) == 0 )

    {

        if(!IsPlayerAdmin(playerid))

        {

            SendClientMessage(playerid,0xFF0000AA,"Doar administratorii pot folosi aceasta comanda.");

            return 1;

        }

        // Codul tau.

        return 1;

}[/pawn]

Aici la codul tau cuma dica codul ce trebuie sa pun comanda sau ce?

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.