Author Topic: Funtion LevelCmds  (Read 2144 times)

0 Members and 1 Guest are viewing this topic.

Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Funtion LevelCmds
« on: December 31, 2011, 04:08:27 am »
I need the function levelcmds  Please!:'( :'( :'(
« Last Edit: December 31, 2011, 04:12:48 am by omarlin97 »
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Re: Funtion LevelCmds
« Reply #1 on: December 31, 2011, 04:05:12 pm »
the need Please...
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/

Offline DilsonTB

  • Made Man
  • ***
  • Posts: 140
  • VC:MP Developer. & SA:MP Currently Developer
    • View Profile
Re: Funtion LevelCmds
« Reply #2 on: January 01, 2012, 07:43:48 pm »
Primero:

Crear carpeta ("Configuracion")
Luego un archivo de texto (.ini) ("Comandos")

Luego pon en el script:

Funcion:

stock NiveldeComando(playerid,cmd[]) {
   return (PlayerInfo[playerid][nivel] >= dini_Int("/Configuracion/Comandos.ini",cmd)) ? true : false;
}

Luego en comandos:

[pawn]   else if (strcmp(cmd, "ponercmd", true) == 0) {
       new tmp2[256];
      tmp = strtok(cmdtext, idx), tmp2 = strtok(cmdtext, idx);
      if(PlayerInfo[playerid][Logged] != 1) SendClientMessage(playerid, COLOR_RED, "Tienes que estar logueado primero!");
      else if(!NivelDeComando(playerid,"niveldecmd")) SendClientMessage(playerid, COLOR_RED, "No tienes acceso a este cmd!");
      else if (!strlen(tmp2)) SendClientMessage(playerid,COLOR_YELLOW,"USE: /c setcmdlevel [Comando] [Nivel]");
      else {
         new szMsg[256];
         dini_Set("Configuracion/Comandos.ini", tmp, tmp2);
         format(szMsg,sizeof(szMsg),"Nivel de comando:[ %s ] Cambiado a:[ %s ]",tmp,tmp2);
         SendClientMessage(playerid,COLOR_YELLOW,szMsg);
      }
      return 1;
   }[/pawn]

De nada.!  ;D
« Last Edit: January 01, 2012, 08:23:25 pm by DilsonTB »
_______________________________________________
¬ VC:MP Squirrel Developer.
¬ VC:MP pawno Developer.
¬ SA:MP Developer.
¬
¬ Actually developing " San Fierro Roleplay - Latino ", with
my beta team testers, Mapper + Scripter ( me ), 18,000
lines, and is 34% finished. hope to finish it in 4 Or 3 Months.

- MYSQL FULL BASED.
- PCU.
_______________________________________________

Offline omarlin97

  • Street Thug
  • *
  • Posts: 41
  • Scripter The Server Pawno
    • View Profile
    • Dominican Server Latino
Re: Funtion LevelCmds
« Reply #3 on: January 01, 2012, 07:54:04 pm »
Gracias man!
Owner end creator the Server TDM

Dominican Server Latino
web site: http://dominicanserver.net16.net/