searching for filterscript to give money to another player pls help
#1

i'm searching for a filterscript to give money form your own to another player
Not the one from moneygrub ,, and not the command /givemoney
something like givecash is ok

Can anyone help me pls
Reply
#2

pawn Код:
dcmd_givecash(playerid, params[])
{
    new
        giveplayerid,
        amount;
    if (sscanf(params, "ud", giveplayerid, amount)) SendClientMessage(playerid, 0xFF0000AA, "USAGE: /givecash <playerid> <amount>");
    else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "ERROR: Player not found!");
    else if (amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xFF0000AA, "ERROR: Insufficient funds!");
    else
    {
        GivePlayerMoney(giveplayerid, amount);
        GivePlayerMoney(playerid, 0 - amount);
        SendClientMessage(playerid, 0x00FF00AA, "INFO: You have sent money.");
        SendClientMessage(giveplayerid, 0x00FF00AA, "INFO: You have received money.");
    }
    return 1;
}
?
Reply
#3

Quote:
Originally Posted by Matz
Посмотреть сообщение
pawn Код:
dcmd_givecash(playerid, params[])
{
    new
        giveplayerid,
        amount;
    if (sscanf(params, "ud", giveplayerid, amount)) SendClientMessage(playerid, 0xFF0000AA, "USAGE: /givecash <playerid> <amount>");
    else if (giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, 0xFF0000AA, "ERROR: Player not found!");
    else if (amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, 0xFF0000AA, "ERROR: Insufficient funds!");
    else
    {
        GivePlayerMoney(giveplayerid, amount);
        GivePlayerMoney(playerid, 0 - amount);
        SendClientMessage(playerid, 0x00FF00AA, "INFO: You have sent money.");
        SendClientMessage(giveplayerid, 0x00FF00AA, "INFO: You have received money.");
    }
    return 1;
}
?
C:\Users\\Desktop\grandlarc.pwn(757) : error 054: unmatched closing brace ("}")
C:\Users\\Desktop\grandlarc.pwn(760) : warning 203: symbol is never used: "dcmd_givecash"
Reply
#4

Quote:
Originally Posted by prefex
Посмотреть сообщение
C:\Users\\Desktop\grandlarc.pwn(757) : error 054: unmatched closing brace ("}")
C:\Users\\Desktop\grandlarc.pwn(760) : warning 203: symbol is never used: "dcmd_givecash"
nvm the C:\Users\\Desktop\grandlarc.pwn(757) : error 054: unmatched closing brace ("}") fixed that xD
Reply
#5

pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
add this under
pawn Код:
#endif
EDIT: do you have sscanf
Reply
#6

Quote:
Originally Posted by Gangster-rocks
Посмотреть сообщение
pawn Код:
#define dcmd(%1,%2,%3) if (!strcmp((%3)[1], #%1, true, (%2)) && ((((%3)[(%2) + 1] == '\0') && (dcmd_%1(playerid, ""))) || (((%3)[(%2) + 1] == ' ') && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1
add this under
pawn Код:
#endif
EDIT: do you have sscanf
#endif ?? cant find that :S , srr i'm kinda new at this ^^
and i have sscanf2
Reply
#7

-_-
pawn Код:
#endif

public OnGameModeInit()
look there
+ rep if i helped you
Reply
#8

Quote:
Originally Posted by Gangster-rocks
Посмотреть сообщение
-_-
pawn Код:
#endif

public OnGameModeInit()
look there
i can find the public OnGameModeInit() but endif isnt there xD
Reply
#9

Pm me with your script.
Reply
#10

Quote:
Originally Posted by Gangster-rocks
Посмотреть сообщение
Pm me with your script.
nvm found it ^^
but now i get
C:\Users\Stijn\Desktop\Gta Server\Samp Server\pawno\new.pwn(59) : fatal error 100: cannot read from file: "sscanf"

but i can only find sscanf 2 :S
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)