Jump to content

Question

Posted

Salut sunt nou pe aici :).Am un server de samp deschis de ceva vreme insa imi cam da de cap :)).Deci cand bag sa zic o comanda noua la script ex: /teles o fac corect nu imi da nici o eroare dupa cand intru pe server merge DOAR aceea comanda restul zici ca nu le-am scris.

De la ce poate fii?

9 answers to this question

Recommended Posts

Posted

[pawn] if(!strcmp(cmdtext, "/help"))

    {

        SendClientMessage(playerid, 0xFFFFFFFF, "Pentru arme foloseste /arme,iar pentru teleporturi foloseste /teles!");

        return 1;

    }

    return 0;[/pawn]

am asezat-o intre celelate comenzi gen /heal /arme /ak47

Posted

Uite:

if(strcmp(cmd, "/help", true) == 0))
{
    if(IsPlayerConnected(playerid))
    {
        SendClientMessage(playerid, 0xFFFFFFFF, "Pentru arme foloseste /arme,iar pentru teleporturi foloseste /teles!");
    }
    return (1) ;
}

LISTA - GAMEMODE-URI SA-MP - Le gasiti pe toate aici: http://twiriock.com/3MGP

Posted

Zcmd + Foreach ( foreach este folosit in loc de bucle )

CMD:foreach( playerid , params[ ] ) // Command Proccesor ZCMD By ZEEX

{

        foreach(new i: Player) // Foreach By Alex "Y_LESS" Cole

        {// comanda deschisa

                  new

                        string[ 256 ] ; // stringul

         

                  format( string , sizeof string , "Admin %s a dat viata si armura la toti playerii conectati", GetName( playerid ) ) ; // Formatul care trimite mesajul

                  SendClientMessageToAll( -1 , string  ); // Functia care trimite mesaj la toti

                  SetPlayerHealth( i , 100 ); // functia care seteaza viata

                  SetPlayerArmour( i , 100 ); // functia care seteaza armura

          }// comanda inchisa

          return ( 1 ); // returneaza 1 adica true

}

if(!strcmp(cmdtext, "/help", true) == 0 ))

{

        SendClientMessage(playerid, 0xFFFFFFFF, "Pentru arme foloseste /arme,iar pentru teleporturi foloseste /teles!");

        return 1;

}   

return 0; ce cauta acolo ?   

idiots.png
Posted

Anakin" post="139040" timestamp="1365584512"]

Zcmd + Foreach ( foreach este folosit in loc de bucle )

Defapt, Foreach este inlocuitorul buclelor si nu "este folosit in loc de bucle".

Anakin link=topic=26197.msg139040#msg139040 date=1365584512]

return 0; ce cauta acolo ? 

Public-ul OnPlayerCommandText reintoarce valoarea 0.

Salut sunt nou pe aici :).Am un server de samp deschis de ceva vreme insa imi cam da de cap :)).Deci cand bag sa zic o comanda noua la script ex: /teles o fac corect nu imi da nici o eroare dupa cand intru pe server merge DOAR aceea comanda restul zici ca nu le-am scris.

De la ce poate fii?

public OnPlayerCommandText ( playerid , cmdtext [ ] )

{

    if ( !strcmp ( cmdtext , "/help" , true ) )

    {

        if ( IsPlayerConnected ( playerid ) )

        {

            // ...

            return ( 1 ) ;

        }

    }

    return ( 0 ) ;

}

Posted

Anakin" post="139085" timestamp="1365594903"]

Daca el avea doar

return ( 0 ) ;

}

Mai ziceam dar el avea doar return ( 0 ) ; -_-

El doar a dat codul fara o acolada, dar in script, acea acolada exista.

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.