Jump to content

Question

Posted

Cum pun comanda asta:

public OnPlayerCommandText(playerid, cmdtext[])

{

if(!strcmp(cmdtext, "/jail", true, 5))

{

    if (IsPlayerAdmin(playerid))

    {

        if(!strlen(cmdtext[6]))

        {

            SendClientMessage(playerid, COLOR_ORED, "Usage: /jail [playerid]");

            return 1;

        }

        new ID = strval(cmdtext[6]);

        new strv[170];

        if(IsPlayerConnected(ID))

        {

            format(strv, 170, "~ You have been jailed");

            SendClientMessage(ID,COLOR_ORANGE, strv);

            SetPlayerPos(ID, 264.8763,81.9862,1001.0390);

            SetPlayerInterior(ID, 6);

        }

    }

    return SendClientMessage(playerid, COLOR_RED, "Tu nu esti admin!");

} sa fie pe skin..adica ai skinul respectiv..ai acces la comanda

1 answer to this question

Recommended Posts

Posted

pai faci asa:

if(!strcmp(cmdtext, "/jail", true, 5))
{
    if ( GetPlayerSkin( playerid ) == 218 ) // 218 semnifica skinul poti sa schimbi ce skin vrei...de ex 0 sau 1, 2...
    {
        if ( IsPlayerAdmin( playerid ) )
        {
            if ( !strlen( cmdtext[ 6 ] ) )
            {
                SendClientMessage( playerid, COLOR_ORED, "Usage: /jail [ playerid ]" );
                return 1;
            }
            new ID = strval( cmdtext[ 6 ] );
            new strv[ 170 ];
            if ( IsPlayerConnected( ID ) )
            {
            format( strv, 170, "~ You have been jailed" );
            SendClientMessage( ID, COLOR_ORANGE, strv );
            SetPlayerPos( ID, 264.8763,81.9862,1001.0390 );
            SetPlayerInterior( ID, 6 );
           }
    }
    return SendClientMessage( playerid, COLOR_RED, "Tu nu esti admin!" );
}
return SendClientMessage( playerid, COLOR_RED, "Nu ai skinul care trebuie pentru a folosi comanda! " );

Fara reclama in semnatura!

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.