Jump to content
  • 0

Ajutor comanda.


Lexu97

Question

Problemă întâlnită (descriere):Nu reusesc sa-i dau de cap.
Ero(area / rile) / warning-(ul / urile):
Liniile de cod / sursa / script-ul:Am gasit un game mod fara comanda surrender,in romana preda-te.
Imagini / Video (optional):
Aţi încercat să rezolvaţi singur?:Da,is disperat,nu ma pricep asa bine.

Va rog sa ma ajutati,acum ceva timp m-am apucat de editat un gamemode,dar nu are comanda /surrender,este pe baza de mysql r6 cred,nu reusesc sa-i dau de cap,care ma ajuta macar sa intre la inchisoare si sa-i ia bani,indiferent de wanted.Va rog mult cei care se pricep sa ma ajute,multumesc!

Sau macar sa-mi dea cineva un FS cu,comanda.

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Arata-ne  ce ai incercat sa faci.. 

if(strcmp(cmd, "/surrender", true) == 0)
{
   if(IsPlayerConnected(playerid))
  {
if(WantedLevel[playerid] > 1)
{
       if(!PlayerToPoint(3.0, playerid, 246.4641,118.5369,1003.2188))
{
   SendClientMessage(playerid, COLOR_GREY, "{30a030}[]: {ffffff}Ne pare rau, dar nu esti in Sediul {000cff}Police Departament{ffffff}.");
   return 1;
}
if(WantedLevel[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "{30a030}[]: {ffffff}Ne pare rau, dar nu te poti preda cu Wanted 0.");
   return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GivePlayerMoney(playerid, -moneys);
ClearCrime(giveplayerid);
ResetPlayerWeapons(playerid);
format(string, sizeof(string), "<< %s s-a predat, avea Wanted %d >>", sendername ,WantedLevel[playerid]);
OOCNews(COLOR_LIGHTRED, string);
  SetPlayerInterior(playerid, 10);
SetPlayerPos(playerid,218.9596,111.0268,999.0156);
PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid])*(100);
PlayerInfo[playerid][pJailed] = 1;
PlayerInfo[playerid][pArrested] += 1;
PlayerInfo[playerid][pJailTime] = (WantedLevel[playerid])*(100);
SetPlayerFree(playerid,playerid, "Esti Arestat");
GivePlayerMoney(playerid, -100);
WantedPoints[playerid] = 0;
WantedLevel[playerid] = 0;
SetPlayerWantedLevel(playerid, 0);
ResetPlayerWeapons(playerid);
 
}
}
return 1;
}
Link to comment
Share on other sites

Ai verificat daca coordonatele de la  

if(!PlayerToPoint(3.0, playerid, 246.4641,118.5369,1003.2188))
sunt puse corect ? Adica daca sunt coordonatele de la zona unde trebuie sa scri /surrender ?

 

Incearca sa modifici

if(WantedLevel[playerid] > 1)
cu :
if(WantedLevel[playerid] >= 1)
.
Link to comment
Share on other sites

 

Ai verificat daca coordonatele de la  

if(!PlayerToPoint(3.0, playerid, 246.4641,118.5369,1003.2188))
sunt puse corect ? Adica daca sunt coordonatele de la zona unde trebuie sa scri /surrender ?

 

Incearca sa modifici

if(WantedLevel[playerid] > 1)
cu :
if(WantedLevel[playerid] >= 1)
.

Ma poti ajuta cu comanda aceasta? am luat-o din al gamemode.

 

Errorile sun aceastea:

 

(69649) : error 010: invalid function or declaration
(69651) : error 010: invalid function or declaration
(69653) : error 010: invalid function or declaration
(69655) : error 010: invalid function or declaration
(69658) : error 010: invalid function or declaration
(69665) : error 021: symbol already defined: "SetPlayerInterior"
(69670) : error 021: symbol already defined: "SetPlayerFree"
(69676) : error 010: invalid function or declaration
(69681) : error 010: invalid function or declaration
 
 
iar linia este aceasta :
 
if(strcmp(cmd, "/surrender", true) == 0)
{
   if(IsPlayerConnected(playerid))
  {
if((WantedLevel[playerid] >= 1) && (WantedLevel[playerid] <= 3))
{
       if(!PlayerToPoint(2.0, playerid, ) || PlayerToPoint(2.0, playerid, ))
{
   SCM(playerid, COLOR_WHITE, "You don't a surrender place");
   return (1) ;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
GivePlayerMoney(playerid, -moneys);
ResetPlayerWeapons(playerid);
format(string, sizeof(string), "%s had surrender having wanted %d ", sendername ,WantedLevel[playerid]);
OccAnunt(COLOR_LIGHTRED, string);
SetPlayerInterior(playerid, 6);
SetPlayerPos(playerid,264.2164,82.0997,1001.0391);
InfoJucator[playerid][zJilava] = 1;
InfoJucator[playerid][zArestat] += 1;
InfoJucator[playerid][zJilavaTimp] = (WantedLevel[playerid])*(120);
SetPlayerFree(playerid,playerid, "Got Arrested");
SetPlayerWantedLevel(playerid, 0);
WantedPoints[playerid] = 0;
WantedLevel[playerid] = 0;
WantedJail[playerid] = 1;
}
else
{
   SCM(playerid, COLOR_WHITE, "Must have wanted 1 or your wanted level is more than 3!");
}
}
return (1) ;
}
Link to comment
Share on other sites

(69665) : error 021: symbol already defined: "SetPlayerInterior"
(69670) : error 021: symbol already defined: "SetPlayerFree"

Caută SetPlayerInterior și SetPlayerFree - le ai pe fiecare de două ori definite și nu e ok. Caută „SetPlayerInterior” te uiți dacă îl ai de două ori, iar dacă îl ai îl ștergi, astfel încât să rămână în gm doar o singură dată. # idem și la SetPlayerFree

 

 

P.S: Încearcă asta

if(strcmp(cmd, "/surrender", true) == 0)
{
  if(IsPlayerConnected(playerid))
  {
    if((WantedLevel[playerid] >= 1) || (WantedLevel[playerid] <= 3))
    {
      if(!PlayerToPoint(2.0, playerid, ) || PlayerToPoint(2.0, playerid, ))
      {
         SCM(playerid, COLOR_WHITE, "You don't a surrender place");
         return 1;
      }
      GetPlayerName(playerid, sendername, sizeof(sendername));
      GivePlayerMoney(playerid, -moneys);
      ResetPlayerWeapons(playerid);
      format(string, sizeof(string), "%s had surrender having wanted %d ", sendername ,WantedLevel[playerid]);
      OccAnunt(COLOR_LIGHTRED, string);
      SetPlayerInterior(playerid, 6);
      SetPlayerPos(playerid,264.2164,82.0997,1001.0391);
      InfoJucator[playerid][zJilava] = 1;
      InfoJucator[playerid][zArestat] += 1;
      InfoJucator[playerid][zJilavaTimp] = (WantedLevel[playerid])*(120);
      SetPlayerFree(playerid,playerid, "Got Arrested");
      SetPlayerWantedLevel(playerid, 0);
      WantedPoints[playerid] = 0;
      WantedLevel[playerid] = 0;
      WantedJail[playerid] = 1;
    }
    else
    {
      SCM(playerid, COLOR_WHITE, "Must have wanted 1 or your wanted level is more than 3!");
    }
  }
  return 1;
}

350x20_00FFF7_FFFFFF_000000_000000.png7YwhJMC.png

ySdxY9L.png

 

76561198117970407.png9Xc59Z4.png

Link to comment
Share on other sites

(69665) : error 021: symbol already defined: "SetPlayerInterior"
(69670) : error 021: symbol already defined: "SetPlayerFree"

Caută SetPlayerInterior și SetPlayerFree - le ai pe fiecare de două ori definite și nu e ok. Caută „SetPlayerInterior” te uiți dacă îl ai de două ori, iar dacă îl ai îl ștergi, astfel încât să rămână în gm doar o singură dată. # idem și la SetPlayerFree

 

 

P.S: Încearcă asta

if(strcmp(cmd, "/surrender", true) == 0)
{
  if(IsPlayerConnected(playerid))
  {
    if((WantedLevel[playerid] >= 1) || (WantedLevel[playerid] <= 3))
    {
      if(!PlayerToPoint(2.0, playerid, ) || PlayerToPoint(2.0, playerid, ))
      {
         SCM(playerid, COLOR_WHITE, "You don't a surrender place");
         return 1;
      }
      GetPlayerName(playerid, sendername, sizeof(sendername));
      GivePlayerMoney(playerid, -moneys);
      ResetPlayerWeapons(playerid);
      format(string, sizeof(string), "%s had surrender having wanted %d ", sendername ,WantedLevel[playerid]);
      OccAnunt(COLOR_LIGHTRED, string);
      SetPlayerInterior(playerid, 6);
      SetPlayerPos(playerid,264.2164,82.0997,1001.0391);
      InfoJucator[playerid][zJilava] = 1;
      InfoJucator[playerid][zArestat] += 1;
      InfoJucator[playerid][zJilavaTimp] = (WantedLevel[playerid])*(120);
      SetPlayerFree(playerid,playerid, "Got Arrested");
      SetPlayerWantedLevel(playerid, 0);
      WantedPoints[playerid] = 0;
      WantedLevel[playerid] = 0;
      WantedJail[playerid] = 1;
    }
    else
    {
      SCM(playerid, COLOR_WHITE, "Must have wanted 1 or your wanted level is more than 3!");
    }
  }
  return 1;
}

 error 010: invalid function or declaration ....nu pot scapa de erroarea asta,iar sa pun comanda pe un fs oare ar merge? te rog frumos sa ma ajuti daca te pricepi.

Link to comment
Share on other sites

Aratane linia unde iti arata eroarea.

(69650) : error 010: invalid function or declaration
(69652) : error 010: invalid function or declaration
(69654) : error 010: invalid function or declaration
(69656) : error 010: invalid function or declaration
(69659) : error 010: invalid function or declaration
(69666) : error 021: symbol already defined: "SetPlayerInterior"
(69671) : error 021: symbol already defined: "SetPlayerFree"
(69677) : error 010: invalid function or declaration
(69682) : error 010: invalid function or declaration
 
69650 de unde incepe comanda, 69682 unde se termina.
Gireada,ce spui? pot baga comanda sa o fac intr-un FS sa reusesc sa o fac si eu? ca inebunesc de cand ma chiunui,sau cel care a facut gamemodul nu permite asta.
Link to comment
Share on other sites

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.