I don't know why not working [FS]
#1

So i Are From LITHUANIA so look i make it

public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);

if(strcmp(cmd, "/wb", true) == 0) && PlayerToPoint(1.5 ,playerid,2305.6890,-16.0881,26.7496))
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
if(PlayerInfo[playerid][pLeader] == 7)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "NAUDOJIMAS: /wb [pinigu suma]");
new
takeamount = strval(tmp),
name[MAX_PLAYER_NAME];
if(takeamount > biudzetas)
{
SendClientMessage(playerid, COLOR_GREY, " Biudzete tiek pinigu nera.");
format(string, sizeof(string), "Dabartinis biudzetas: [$%d]", biudzetas);
SendClientMessage(playerid, COLOR_WHITE, string);
return 1;
}
if(takeamount < 0) return 1;
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
biudzetas -= takeamount;
format(string, sizeof(string), "Meras %s nueme [$%d] is biudzeto (Biudzete liko: $%d).", name, takeamount, biudzetas);
SendClientMessageToAll(COLOR_WHITE, string);
GivePlayerMoney(playerid, takeamount);
SaveStuff();
}
else SendClientMessage(playerid, COLOR_GREY, " Tu neesi meras !");
}
}
return 1;
}

if(strcmp(cmd, "/db", true) == 0) && PlayerToPoint(1.5 ,playerid,2305.6890,-16.0881,26.7496))
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid])
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "NAUDOJIMAS: /db [pinigu suma]");
new
giveamount = strval(tmp),
name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, MAX_PLAYER_NAME);
if(giveamount < 1 || giveamount > 999999) return SendClientMessage(playerid, COLOR_GREY, " Bloga pinigu suma !");
if(giveamount > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_GREY, " Jus neturite tiek pinigu !");
biudzetas += giveamount;
format(string, sizeof(string), "%s idejo $%d i biudzeta (Dabartinis biudzetas: %d$)", name, giveamount, biudzetas);
SendClientMessageToAll(COLOR_WHITE, string);
GivePlayerMoney(playerid, -giveamount);
SaveStuff();
}
SendClientMessage(playerid, COLOR_ORANGE, " Jus neasate banke! ");
}
return 1;
}

Why its not working ?
P.S. Sorry for bad English and that is Lithuania language
Reply
#2

For starters:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new string[256];
    new playermoney;
    new sendername[MAX_PLAYER_NAME];
    new giveplayer[MAX_PLAYER_NAME];
    new playername[MAX_PLAYER_NAME];
    new cmd[256];
    new tmp[256];
    new giveplayerid, moneys, idx;
    cmd = strtok(cmdtext, idx);

    if(strcmp(cmd, "/wb", true) == 0) && PlayerToPoint(1.5 ,playerid,2305.6890,-16.0881,26.7496))
    {
      if(IsPlayerConnected(playerid))
      {
        if(gPlayerLogged[playerid])
        {
          if(PlayerInfo[playerid][pLeader] == 7)
          {
                    tmp = strtok(cmdtext, idx);
                    if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "NAUDOJIMAS: /wb [pinigu suma]");
            new
              takeamount = strval(tmp),
              name[MAX_PLAYER_NAME];
                    if(takeamount > biudzetas)
                    {
                        SendClientMessage(playerid, COLOR_GREY, " Biudzete tiek pinigu nera.");
                        format(string, sizeof(string), "Dabartinis biudzetas: [$%d]", biudzetas);
                        SendClientMessage(playerid, COLOR_WHITE, string);
                        return 1;
                    }
                    if(takeamount < 0) return 1;
                    GetPlayerName(playerid, name, MAX_PLAYER_NAME);
                    biudzetas -= takeamount;
                    format(string, sizeof(string), "Meras %s nueme [$%d] is biudzeto (Biudzete liko: $%d).", name, takeamount, biudzetas);
                    SendClientMessageToAll(COLOR_WHITE, string);
                    GivePlayerMoney(playerid, takeamount);
                    SaveStuff();
          }
          else SendClientMessage(playerid, COLOR_GREY, " Tu neesi meras !");
        }
      }
      return 1;
    }

    if(strcmp(cmd, "/db", true) == 0) && PlayerToPoint(1.5 ,playerid,2305.6890,-16.0881,26.7496))
    {
      if(IsPlayerConnected(playerid))
      {
        if(gPlayerLogged[playerid])
        {
          tmp = strtok(cmdtext, idx);
          if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "NAUDOJIMAS: /db [pinigu suma]");
          new
            giveamount = strval(tmp),
            name[MAX_PLAYER_NAME];
                GetPlayerName(playerid, name, MAX_PLAYER_NAME);
                if(giveamount < 1 || giveamount > 999999) return SendClientMessage(playerid, COLOR_GREY, " Bloga pinigu suma !");
                if(giveamount > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_GREY, " Jus neturite tiek pinigu !");
                biudzetas += giveamount;
                format(string, sizeof(string), "%s idejo $%d i biudzeta (Dabartinis biudzetas: %d$)", name, giveamount, biudzetas);
                SendClientMessageToAll(COLOR_WHITE, string);
                GivePlayerMoney(playerid, -giveamount);
                SaveStuff();
        }
        SendClientMessage(playerid, COLOR_ORANGE, " Jus neasate banke! ");
      }
        return 1;
    }
Reply
#3

It's not working anyway
Reply
#4

Let me guess.. It gave you the same errors as before? maybe he used pawn tags so it was readable.
Reply
#5

Could you post the errors please or say what doesn't work?
Reply
#6

There is no Errors there is no Warnings but anyway it not working but if i write /db its not show any thing it's look like there are not that [FS]
Reply
#7

If anyone can fix it ?
Reply
#8

Quote:

/rcon loadfs name

Reply
#9

No its loaded
Reply
#10

I think you're a bit STUPID !!! OMG , what you have there , is GodFather STUFF !!

You must put the code in the GM GodFather
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)