[pomoc] strcmp

Započeo Nemanja.AmX, Jul 03, 2013, 19:25:49 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 2 gostiju pregledaju ovu temu.

Skripta koju koristim:SE
Detaljan opis problema:pa posto nemam ni jednu ovakvu cmd    if(strcmp(cmd, zanima me sta sve treba da dodam da bi radila sve mi je u YCMD pa ako moze neko da kaze sta da dodam da bi ta strcmp radila aj kao moze neko pls
Dio skripte:/
Neke slike/video za lakse dobivanje pomoci(neobavezno):/
Underpoint Rp mod od save http://www.sendspace.com/file/fadrnd

Zasto bi koristio strcmp i upropastio taj fini mod koji je u YCMD-u? Moj ti je predlog da ne radis to,ali kako god,tvoja volja..
Treba ti public OnPlayerCommandText...


Proucis par komandi iz tog moda i shvatis,princip skriptanja je slican..

Takodje mozes posjetiti i :

http://forum.sa-mp.com/showthread.php?t=169029

mos mi pomognes kako npr prebacim ovu cmd pls
if(strcmp(cmd, "/trajekt", true) == 0)
    {
// 
            if (PlayerToPoint(10.0, playerid,438.79998779,-1905.90002441,1.70000005))
{
if(trajektA == 0) // NA PLAZI
{
              MoveDynamicObject(trajekt,439.10000610, -2313.19995117, 1.70000005, 11.00);
              SCM(playerid, COLOR_BLUE,"Pokrenuo si Island Trajekt!");
              GetPlayerName(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "{0084e3}[{FFFFFF}Cuvar{0084e3}]: Uzivajte na nasem skromnom Otoku!{0084e3}!!!", sendername);
              ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
              trajektA = 1;
  return 1;
  }
  else
  {
  MoveDynamicObject(trajekt,438.79998779,-1905.90002441,1.70000005, 11.00);
              SCM(playerid, COLOR_BLUE,"Pozvao si Island Trajekt!");
              GetPlayerName(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "{0084e3}[{FFFFFF}Cuvar{0084e3}]: Molimo vas sacekajte dok nestigne trajekt!{0084e3}!!!", sendername);
              ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
              trajektA = 0;
              return 1;
  }
            } 
            else if (PlayerToPoint(10.0, playerid, 439.10000610, -2313.19995117, 1.70000005))
{
if(trajektA == 0)
  {
  MoveDynamicObject(trajekt,439.10000610, -2313.19995117, 1.70000005, 11.00);
              SCM(playerid, COLOR_BLUE,"Pozvao si Island Trajekt!");
              GetPlayerName(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "{0084e3}[{FFFFFF}Cuvar{0084e3}]: Molimo vas sacekajte dok nestigne trajekt!{0084e3}!!!", sendername);
              ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
              trajektA = 1;
              return 1;
  }
else
{
              MoveDynamicObject(trajekt,438.79998779,-1905.90002441,1.70000005, 11.00);
              SCM(playerid, COLOR_BLUE,"Pokrenuo si Island Trajekt!");
              GetPlayerName(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "{0084e3}[{FFFFFF}Cuvar{0084e3}]: Hvala na boravku {0084e3}!!!", sendername);
              ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
              trajektA = 0;
  return 1;
  }
            }
          SendClientMessage(playerid, COLOR_GRAD1, "[GRESKA]  Nisi kod trajekta .");
return 1;
  }
Underpoint Rp mod od save http://www.sendspace.com/file/fadrnd

YCMD:trajekt(playerid, params[], help)
    {
#pragma unused params
                         #pragma unused help
            if (PlayerToPoint(10.0, playerid,438.79998779,-1905.90002441,1.70000005))
{
if(trajektA == 0) // NA PLAZI
{
              MoveDynamicObject(trajekt,439.10000610, -2313.19995117, 1.70000005, 11.00);
              SCM(playerid, COLOR_BLUE,"Pokrenuo si Island Trajekt!");
              GetPlayerName(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "{0084e3}[{FFFFFF}Cuvar{0084e3}]: Uzivajte na nasem skromnom Otoku!{0084e3}!!!", sendername);
              ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
              trajektA = 1;
  return 1;
  }
  else
  {
  MoveDynamicObject(trajekt,438.79998779,-1905.90002441,1.70000005, 11.00);
              SCM(playerid, COLOR_BLUE,"Pozvao si Island Trajekt!");
              GetPlayerName(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "{0084e3}[{FFFFFF}Cuvar{0084e3}]: Molimo vas sacekajte dok nestigne trajekt!{0084e3}!!!", sendername);
              ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
              trajektA = 0;
              return 1;
  }
            } 
            else if (PlayerToPoint(10.0, playerid, 439.10000610, -2313.19995117, 1.70000005))
{
if(trajektA == 0)
  {
  MoveDynamicObject(trajekt,439.10000610, -2313.19995117, 1.70000005, 11.00);
              SCM(playerid, COLOR_BLUE,"Pozvao si Island Trajekt!");
              GetPlayerName(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "{0084e3}[{FFFFFF}Cuvar{0084e3}]: Molimo vas sacekajte dok nestigne trajekt!{0084e3}!!!", sendername);
              ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
              trajektA = 1;
              return 1;
  }
else
{
              MoveDynamicObject(trajekt,438.79998779,-1905.90002441,1.70000005, 11.00);
              SCM(playerid, COLOR_BLUE,"Pokrenuo si Island Trajekt!");
              GetPlayerName(playerid, sendername, sizeof(sendername));
          format(string, sizeof(string), "{0084e3}[{FFFFFF}Cuvar{0084e3}]: Hvala na boravku {0084e3}!!!", sendername);
              ProxDetector(30.0, playerid, string, COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE,COLOR_BLUE);
              trajektA = 0;
  return 1;
  }
            }
          SendClientMessage(playerid, COLOR_GRAD1, "[GRESKA]  Nisi kod trajekta .");
return 1;
  }