[POMOĆ] 26 Errora (Kada ubacim komandu)


Započeo Jackâ„¢, Septembar 03, 2014, 16:20:59 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: od 0 moja
Detaljan opis problema: Pa kada ubacim tu komandu ona je bila prije /namesoff & /nameson (nestajanje imena i vracanje imena). I sada hocu da bude /names on or /names off tj. da ispisuje /names [on/off] (da se tako upotrebi)
Dio skripte:
    /*if(strcmp(cmd, "/names [on/off]", true) == 0)
      {
      new x_nr[256];
       x_nr = strtok(cmdtext, idx);
      if(!strlen(x_nr)) {
      SCM(playerid, COLOR_DGOLD, "KORISTENJE: /names [on/off]");
      return 1;
      }
      else if(strcmp(x_nr, "on", true) == 0)
      {
      for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
      SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste iskljucili imena igraca - da ih ponovno ukljucite koristite '/nameson' komandu.");
      }
        else if(strcmp(x_nr, "off", true) == 0)
      {
      for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
      SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste ukljucili imena igraca - da ih ponovno iskljucite koristite '/namesoff' komandu.");
      return 1;
      }*/

Neke slike/video za lakse dobivanje pomoci(neobavezno): Errori : http://pastebin.com/3XamtEpp




/* .... */ sam ja stavio da mi ne smeta.

Action Gaming RP


  • Skripta - 100%
  • Mapa - 100%
  • Forum - 100%


Action Gaming RolePlay Forum

Probaj ovo
if(strcmp(cmd, "/names [on/off]", true) == 0)
{
	new x_nr[256];
        x_nr = strtok(cmdtext, idx);
        if(!strlen(x_nr)) return SCM(playerid, COLOR_DGOLD, "KORISTENJE: /names [on/off]");
      	if(strcmp(x_nr, "on", true) == 0)
      	{
      		for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
      		SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste iskljucili imena igraca - da ih ponovno ukljucite koristite '/nameson' komandu.");
		return 1;
      	}
        else if(strcmp(x_nr, "off", true) == 0)
      	{
      		for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
      		SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste ukljucili imena igraca - da ih ponovno iskljucite koristite '/namesoff' komandu.");
      		return 1;
      	}
}

ubaci sscanf i ovako onda
new ejnane;
ongamemodeniti
ojnane = 0;
u komandi
(Y)CMD:names(playerid, params[])
{
 if(!IsPlayerConnected(playerid)) return SendClientMessage(playerid,-1,"Nisi konektovan");
 new vrsta;
 if(sscanf(params,"i",vrsta)) return SendClientMessage(playerid,-1,"Koristi /names 1 = ukljuceno | 2 = izgaseno");
 if(vrsta < 1 || vrsta > 2) return SendClientMessage(playerid,-1,"Ne moze biti vrsta manja od 1 ili veca od 2 ");
 if(vrsta == 1)
 {
   for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
   SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste iskljucili imena igraca - da ih ponovno ukljucite koristite '/nameson' komandu.");
 }
 else if(vrsta == 2)
        {
          for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
         SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste iskljucili imena igraca - da ih ponovno ukljucite koristite '/nameson' komandu.");
        }
return 1;
}
-      @ Mirzerian_06     -


You wanna play a game? Alright.

Citat: CamPeR1232 poslato Septembar 03, 2014, 22:59:58 POSLE PODNE
Probaj ovo
if(strcmp(cmd, "/names [on/off]", true) == 0)
{
	new x_nr[256];
        x_nr = strtok(cmdtext, idx);
        if(!strlen(x_nr)) return SCM(playerid, COLOR_DGOLD, "KORISTENJE: /names [on/off]");
      	if(strcmp(x_nr, "on", true) == 0)
      	{
      		for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, false);
      		SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste iskljucili imena igraca - da ih ponovno ukljucite koristite '/nameson' komandu.");
		return 1;
      	}
        else if(strcmp(x_nr, "off", true) == 0)
      	{
      		for(new i = 0; i < MAX_PLAYERS; i++) ShowPlayerNameTagForPlayer(playerid, i, true);
      		SendClientMessage(playerid, COLOR_GOLD, "INFO: Uspjesno ste ukljucili imena igraca - da ih ponovno iskljucite koristite '/namesoff' komandu.");
      		return 1;
      	}
}


Pomogao, hvala & Lock !

Action Gaming RP


  • Skripta - 100%
  • Mapa - 100%
  • Forum - 100%


Action Gaming RolePlay Forum