Jump to content

Recommended Posts

Posted

asta e comanda

CMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 5) return SCM(playerid, COLOR_WHITE, AdminOnly);
    new money[25],id;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    if(CheckerBigInt(money) != 0) return true;
    Translate32Bit(StoreMoney[id], MoneyMoney[id], money);
    GivePlayerMoney(id, money);
    gString[0] = EOS;
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumberss(money));
    SendAdminMessage(COLOR_WARNING, gString, 5);
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    Update(id, pCashx);
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumberss(money), GetName(playerid));
    InsertLog(id, gString, LOG_MONEY);
    return true;
}

eroarea:

C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(537) : error 017: undefined symbol "AdminOnly"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(542) : error 017: undefined symbol "CheckerBigInt"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : error 017: undefined symbol "Translate32Bit"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : warning 215: expression has no effect
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : error 001: expected token: ";", but found "]"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : error 029: invalid expression, assumed zero
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : fatal error 107: too many error messages on one line

Compilation aborted.

Pawn compiler 3.10.8              Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
[Finished in 0.6s with exit code 1]
[cmd: ['pawncc.exe', '-i includes', 'C:\\Users\\dariu\\OneDrive\\Desktop\\fresh gm\\gamemodes\\gm.pwn', '-;+']]
[dir: C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes]
[path: C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Users\dariu\AppData\Local\Microsoft\WindowsApps;]

Posted
CMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 5) return SendAdminMessage( playerid, -1, "Nu detii nivelul de admin necesar.");
    new money[25],id;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    GivePlayerMoney(id, money);
    gString[0] = EOS;
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumberss(money));
    SendAdminMessage(COLOR_WARNING, gString, 5);
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    Update(id, pCashx);
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumberss(money), GetName(playerid));
    InsertLog(id, gString, LOG_MONEY);
    return true;
}

 

Posted (edited)

CMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage( playerid, -1, "Nu detii nivelul de admin necesar.");
    new money[25],id;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    GivePlayerMoney(id, money);
    gString[0] = EOS;
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumberss(money));
    SendAdminMessage(COLOR_WARNING, gString, 5);
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    Update(id, pCashx);
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumberss(money), GetName(playerid));
    InsertLog(id, gString, LOG_MONEY);
    return true;
}

Edited by AlexxAdv
Posted (edited)

C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(542) : error 035: argument type mismatch (argument 2)
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : error 017: undefined symbol "gString"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : warning 215: expression has no effect
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : error 001: expected token: ";", but found "]"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : error 029: invalid expression, assumed zero
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(543) : fatal error 107: too many error messages on one line

asta imi da acuma

Edited by ImDariusHere
Posted (edited)

CMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage( playerid, -1, "Nu detii nivelul de admin necesar.");
    new money[25],id;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    GivePlayerMoney(id, money);
    new gString[ 256 ];
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumberss(money));
    SendAdminMessage(COLOR_WARNING, gString, 5);
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    Update(id, pCashx);
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumberss(money), GetName(playerid));
    InsertLog(id, gString, LOG_MONEY);
    return true;
}

Edited by AlexxAdv
Posted

C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(542) : error 035: argument type mismatch (argument 2)
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(544) : error 017: undefined symbol "GetName"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(545) : error 017: undefined symbol "SendAdminMessage"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(546) : error 017: undefined symbol "GetName"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(548) : error 017: undefined symbol "Update"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(549) : error 017: undefined symbol "GetName"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(550) : error 017: undefined symbol "InsertLog"

Posted (edited)

stock GetName( playerid )
{
    new name[ MAX_PLAYER_NAME ];
    GetPlayerName( playerid, name, sizeof name);
    return name;
}

CMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage( playerid, -1, "Nu detii nivelul de admin necesar.");
    new id, money;
    if(sscanf(params, "ud",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    GivePlayerMoney(id, money);
    new gString[ 256 ];
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    return true;
}

Edited by AlexxAdv
Posted

C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(551) : error 017: undefined symbol "FormatNumberss"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(553) : error 017: undefined symbol "FormatNumberss"

Posted (edited)

 

stock GetName( playerid )
{
    new name[ MAX_PLAYER_NAME ];
    GetPlayerName( playerid, name, sizeof name);
    return name;
}

stock FormatNumber( number )
{
   new Str[ 15 ];
   format( Str, 15, "%d", number );

   if( strlen( Str ) < 15 )
   {
      if( number >= 1000 && number < 10000 )
             strins( Str, ".", 1, sizeof( Str ) );

      else if( number >= 10000 && number < 100000 )
           strins( Str, ".", 2, sizeof( Str ) );

      else if( number >= 100000 && number < 1000000 )
           strins( Str, ".", 3, sizeof( Str ) );

      else if( number >= 1000000 && number < 10000000 )
           strins( Str, ".", 1, sizeof( Str ) ),strins( Str, ".", 5, sizeof( Str ) );

      else if( number >= 10000000 && number < 100000000 )
           strins( Str, ".", 2, sizeof( Str ) ),strins( Str, ".", 6, sizeof( Str ) );

      else if( number >= 100000000 && number < 1000000000 )
           strins( Str, ".", 3, sizeof( Str ) ),strins( Str, ".", 7, sizeof( Str ) );

      else if( number >= 1000000000 && number < 10000000000 )
           strins( Str, ".", 1, sizeof( Str ) ),
           strins( Str, ".", 5, sizeof( Str ) ),
           strins( Str, ".", 9, sizeof( Str ) );
      else format( Str, 10, "%d", number );
   }
   else format( Str, 15, "<ERROR>" );
   return Str;
}

CMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage( playerid, -1, "Nu detii nivelul de admin necesar.");
    new id, money;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    GivePlayerMoney(id, money);
    new gString[ 256 ];
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumberss(money));
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumberss(money));
    SCM(id, COLOR_WHITE, gString);
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumber(money), GetName(playerid));
    return true;
}

 

Edited by AlexxAdv
Posted

C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(586) : error 017: undefined symbol "FormatNumberss"
C:\Users\dariu\OneDrive\Desktop\fresh gm\gamemodes\gm.pwn(587) : error 017: undefined symbol "FormatNumberss"

 

Posted
CMD:givemoney(playerid, params[], help) {
    if(PlayerInfo[playerid][pAdmin] < 5) return SendClientMessage( playerid, -1, "Nu detii nivelul de admin necesar.");
    new id, money;
    if(sscanf(params, "us[25]",id,money)) return SCM(playerid,COLOR_GREY, "Syntax: {FFFFFF}/givemoney <playerid/name> <Suma>");
    if(!IsPlayerConnected(id) || id == INVALID_PLAYER_ID) return SCM(playerid, COLOR_GREY, "Acel player nu este conectat.");

    GivePlayerMoney(id, money);
    new gString[ 256 ];
    format(gString, sizeof(gString), "(/givemoney) {FFFFFF}%s give %s, $%s money", GetName(playerid), GetName(id), FormatNumber(money));
    format(gString, sizeof(gString), "Admin-ul %s ti-a dat $%s", GetName(playerid), FormatNumber(money));
    SCM(id, COLOR_WHITE, gString);
    format(gString, sizeof(gString), "%s a primit $%s de la %s", GetName(id), FormatNumber(money), GetName(playerid));
    return true;
}

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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