Jump to content
  • 0

Comanda


Deejaybwg

Question

Am creat o comanda:

if(strcmp(cmdtext,"/war",true) == 0)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetVehiclePos(vehicleid,24,181.3335,1936.0958,17);
        GivePlayerWeapon(playerid,35,500);
	}
    else
    {
        SetPlayerPos(playerid,24,181.3335,1936.0958,17);
    }
    return 1;
}
Am dat compile si: C:\Users\Bwggu\Desktop\RSG.pwn(3557) : warning 202: number of arguments does not match definition C:\Users\Bwggu\Desktop\RSG.pwn(3562) : warning 202: number of arguments does not match definition
3557        SetVehiclePos(vehicleid,24,181.3335,1936.0958,17);
3562        SetPlayerPos(playerid,24,181.3335,1936.0958,17);

www.youtube.com/thebwgg

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Am pus asa:

if(strcmp(cmdtext,"/war",true) == 0)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetVehiclePos(vehicleid,24,181.3335);
        GivePlayerWeapon(playerid,35,500);
	}
    else
    {
        SetPlayerPos(playerid,24,181.3335);
    }
    return 1;
}
Si imi da: C:\Users\Bwggu\Desktop\RSG.pwn(3555) : warning 202: number of arguments does not match definition C:\Users\Bwggu\Desktop\RSG.pwn(3560) : warning 202: number of arguments does not match definition Uite coordonatele din Gta San Andreas User File/SAMP/savedpositions:
AddPlayerClass(24,181.3335,1936.0958,17.9401,117.4777,0,0,0,0,0,0); //

www.youtube.com/thebwgg

Link to comment
Share on other sites

AddPlayerClass(24,181.3335,1936.0958,17.9401,117.4777,0,0,0,0,0,0); //

                   

Incearca cu asta  181.3335,1936.0958,17.9401

De ce am pus asta ?

Pai sa fie cat mai explicit mereu dispare prima cifra de la inceput si de la sfarsit ultimele 2 alea dupa 0 (astea 117.4777,0,0,0,0,0,0 )

Cumpar sistem de garaje , /pm

logo.png

Proprietar Xerom Zone

Link to comment
Share on other sites

Si ca sa imi dea o arma pe care o pun cand ma duc acolo cum fac?

GivePlayerWeapon(playerid,35,500); dar cand ma duc acolo nu imi da arma..

da si uite fi atent aici ce reprezinta cifrele in save al tau:

AddPlayerClass(24,181.3335,1936.0958,17.9401,117.4777,0,0,0,0,0,0); //

24 - model skin

181.3335 - coordonata X

1936.0958 - coordonata Y

17.9401 - coordonata Z

Link to comment
Share on other sites

Corect (si cu arma):

if(strcmp(cmdtext,"/war",true) == 0)
{
    new vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {
        SetVehiclePos(vehicleid,181.3335,1936.0958,17);
        GivePlayerWeapon(playerid,35,500);
	}
    else
    {
        SetPlayerPos(playerid,181.3335,1936.0958,17);
    }
    GivePlayerWeapon(playerid,35,500);
    return 1;
}

Link to comment
Share on other sites

Pai uite pune asta

if(strcmp(cmdtext,"/war",true) == 0)
{
    {
        SetPlayerPos(playerid,181.3335,1936.0958,17);
    }
    GivePlayerWeapon(playerid,35,500);
    return 1;
}
Asta
new vehicleid = GetPlayerVehicleID(playerid);
    if(IsPlayerInAnyVehicle(playerid))
    {

Ii aducea si masina iar fara asta il aduce doar pe el si masina ramane in locul in care a scris :)

Edit : Nu sti engleza ?

Cumpar sistem de garaje , /pm

logo.png

Proprietar Xerom Zone

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Similar Content

    • By xLinix96
      Salut, asta este prima mea postare pe aceasta comunitate, astazi vreau sa va arat cum sa creati o comanda /flymode, stiu ca este o comanda foarte simpla, dar sunt unii incepatori care nu stiu sa o faca.
       
      Pentru inceput aveti nevoie de un include.
      #include <fly>
      Il gasiti aici: http://www.solidfiles.com/d/289d6c8fdf/
       
       
      Acum vom face comanda:
      CMD:fly(playerid, params[])
      {
          if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_LIGHTRED, "Trebuie sa te comenctezi."); // aici verificam daca esti conectat
          if(IsPlayerConnected(playerid)) 
          {
              if(PlayerInfo[playerid][pAdmin] >= 1) // aici punem nivelul de admin necesar pentru a folosii comanda.
              {
                  new sendername[30],string[256];
                  if(flymode[playerid] == 0)
                  {
                      GetPlayerName(playerid, sendername, sizeof(sendername)); // aici obtinem numele adminuui.
                      togfind[playerid] = 0;
                      flymode[playerid] = 1;
                      format(string,sizeof(string),"{DFF230}%s este acum in modul fly-mode.", sendername); 
                      ABroadCast(COLOR_ORANGE,string,1);
                      InitFly(playerid);
                      StartFly(playerid);
                      SetPlayerHealthEx(playerid, 10000000); // aici setam hp-ul.
                  }
                  else
                  {
                      GetPlayerName(playerid, sendername, sizeof(sendername)); // iar de aici oprim fly-ul.
                      togfind[playerid] = 1;
                      flymode[playerid] = 0;
                      format(string,sizeof(string),"{F89AD6}Ai oprit fly-mode-ul", sendername);
                      SCM(playerid, COLOR_GREEN, string);
                      StopFly(playerid);
                      SetPlayerHealthEx(playerid, 100); // 
                  }
              }
              else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
          }
          return 1;
      }
       
      Sper ca v-am ajutat, nu este cine site ce sistem.
       
       
    • By FlobertRO
      Cum pot schimba o comanda de tipul "strcmp" in "cmd" ? un exemplu daca se poate, multumesc <3
    • By TheGodfather
      Salut, aveti idee cum pot face o comanda prin care playerii sa se poata reconecta pe server fara sa inchida sampul? Gen sa dea /relog si sa le incarce din nou toate datele, sa puna din nou parola etc.
    • By TheGodfather
      Salut, vreau sa fac o comanda /lastchat cu care sa pot sa vad ultimele x mesaje ale unui jucator. Am incercat asa dar nu imi afiseaza nimic.
      YCMD:lastchat(playerid, params[], help) {
          if(aspam[playerid] > 0) return SCMEx(playerid, COLOR_LIGHTRED, "[Command Anti-Spam] {FFFFFF}Wait %d seconds.", aspam[playerid]);
          if(PlayerInfo[playerid][pAdmin] < 😎 return SCM(playerid,COLOR_WHITE,AdminOnly);
          new giveplayerid[25],id,cont,name[30];
          if(sscanf(params, "s[25]d", giveplayerid, id)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/lastchat <name> <number of messages>");
          cont = MySQLCheckAccount(giveplayerid);
          if(cont == 0) return SCM(playerid,COLOR_ERROR,"Error:{FFFFFF} This account was not found in the database!");
          GetPlayerName(playerid, name, sizeof name);
          //
          new szQuery[256], string[180], MemberString[1024], szResult[180], text[180],TitleString[180];
          format(szQuery, sizeof(szQuery), "SELECT * FROM `logs` WHERE `Name`='%s' ORDER BY `ID` DESC LIMIT %d", GetName(playerid), id);
          new Cache: result = mysql_query(SQL, szQuery);
          for(new i, j = cache_num_rows(); i != j; ++i)
          {
              cache_get_field_content(i, "player", szResult); format(name, 256, szResult);
              cache_get_field_content(i, "Text", szResult);  format(text, 256, szResult);
              format(string, sizeof(string), "%s", text);strcat(MemberString, string, sizeof(MemberString));
          }
          cache_delete(result);
          format(TitleString, sizeof(TitleString), "Last %d messages from player %s.", id, name);
          ShowPlayerDialog(playerid, DIALOG_LASTCHAT, DIALOG_STYLE_TABLIST_HEADERS, TitleString, MemberString, "Ok", "Exit");
          //
          return 1;
      }
      case DIALOG_LASTCHAT: {
                  if(!response) return true;
              }
    • By GabyRo.off
      cum pot face o comanda /snow si sa apara fulgi de zapada pe sv gen /snow pentru o activa si dezactiva
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • 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.