Jump to content
  • 0

Problema money


Fanta

Question

Problema intalnita (descriere): Am 20.000$ si cand sunt la vama si dau /vamals imi ia 1000 de $ si raman cu 19.000. Cand dau relog pe server am tot 20.000$ cat aveam la inceput.
Ero(area / rile) / warning-(ul / urile): - 
Liniile de cod / sursa / script-ul(obligatoriu):
if (strcmp(cmd, "/vamals", true) == 0)
{
        if(IsPlayerConnected(playerid))
   {
   if(IsPlayerInRangeOfPoint(playerid,10.0,65.2037,-1526.1000,4.8882))
   {
   MoveObject(vamals,68.54633, -1526.61121, 1.0664,5.0,0.00000, 0.00000, -90.65991);
   SetTimer("inchidevamals",5000,false);
   SendClientMessage(playerid, COLOR_GREEN,"Ai platit Vama 1000$! In 5 secunde Vama se va inchide");
        GivePlayerMoney(playerid,-1000);
  }
  else
  {
  SendClientMessage(playerid,-1, "Nu esti la vama!");
  }
  }
  return 1;
  }
   
Imagini / Video (optional): -
Ati incercat sa rezolvati singur?: da
Link to comment
Share on other sites

9 answers to this question

Recommended Posts

  • 0
  • 0
  • 0
if (strcmp(cmd, "/vamals", true) == 0)
{
    if(IsPlayerConnected(playerid)) return SendClientMessage(playerid, ~1, "Nu esti conectat!");
    if(IsPlayerInRangeOfPoint(playerid,10.0,65.2037,-1526.1000,4.8882))
    {
        MoveObject(vamals,68.54633, -1526.61121, 1.0664,5.0,0.00000, 0.00000, -90.65991);
        SetTimer("inchidevamals",5000,false);
        SendClientMessage(playerid, COLOR_GREEN,"Ai platit Vama 1000$! In 5 secunde Vama se va inchide");
        GivePlayerMoney(playerid, - 1000);
    }
    else SendClientMessage(playerid,-1, "Nu esti la vama!");
    return 1;
}

Tu nu ai precizat in comanda ce sa se intample daca jucatorul nu este conectat.

Edited by KnowN

242086.png

Link to comment
Share on other sites

  • 0

know te rog mult daca nu sti abtinete... am facut exact cum ai spus si se compileaza cu 20 de errori.... dupa am facut pe scriptu meu si am adaugat si comanda 

return SendClientMessage(playerid, ~1, "Nu esti conectat!");

se compileaza perfect dar nu mai merge /vamals... imi spune ca nu sunt connectat

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.