searching for filterscript to give money to another player pls help -
prefex - 14.07.2012
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
Re: searching for filterscript to give money to another player pls help -
Matz - 14.07.2012
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;
}
?
Re: searching for filterscript to give money to another player pls help -
prefex - 14.07.2012
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"
Re: searching for filterscript to give money to another player pls help -
prefex - 14.07.2012
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
Re: searching for filterscript to give money to another player pls help -
Gangster-rocks - 14.07.2012
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
EDIT: do you have sscanf
Re: searching for filterscript to give money to another player pls help -
prefex - 14.07.2012
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
EDIT: do you have sscanf
|
#endif ?? cant find that :S , srr i'm kinda new at this ^^
and i have sscanf2
Re: searching for filterscript to give money to another player pls help -
Gangster-rocks - 14.07.2012
-_-
pawn Код:
#endif
public OnGameModeInit()
look there
+ rep if i helped you
Re: searching for filterscript to give money to another player pls help -
prefex - 14.07.2012
Quote:
Originally Posted by Gangster-rocks
-_-
pawn Код:
#endif
public OnGameModeInit()
look there
|
i can find the public OnGameModeInit() but endif isnt there xD
Re: searching for filterscript to give money to another player pls help -
Gangster-rocks - 14.07.2012
Pm me with your script.
Re: searching for filterscript to give money to another player pls help -
prefex - 14.07.2012
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