Rob - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Rob (
/showthread.php?tid=341979)
Rob -
Edin Black - 12.05.2012
Hello. I need help.
Can anyone make me the command: /rob [ID]. You must be Rank 3 in the organisations.
With this command, you take 10% of a manґs money.
When I rob you, i take you 10% of your money, that you have in the "hand".
The command in
strcmp
Re: Rob -
Edin Black - 12.05.2012
anyone pls ?
Re: Rob -
Faisal_khan - 12.05.2012
EDIT:
Re: Rob -
thefatshizms - 12.05.2012
Quote:
Originally Posted by Edin Black
anyone pls ?
|
if u want a rly good fs just ask Faisal_khan he is a very good scriptor and very friendly he does it for $$
Re: Rob -
Abreezy - 12.05.2012
Give me a few moments, and I'll make something quick, which you can expand on.
Re: Rob -
Edin Black - 12.05.2012
Abreezy - okej
Re: Rob -
Abreezy - 12.05.2012
pawn Код:
CMD:rob(playerid, params[])
{
new string[128], pID;
if(sscanf(params, "u", pID)) return SendClientMessage(playerid, -1, "Correct usage for command is: /rob playerid");
new cash = GetPlayerMoney(pID);
new Float:steal = cash * 0.10;
format(string, sizeof(string), "You have stolen %d from ID %i", floatround(steal), pID);
SendClientMessage(playerid, -1, string);
GivePlayerMoney(playerid, floatround(steal));
return 1;
}
This is untested, should be what you wanted, let me know if any errors or whatever.
You need ZCMD and SSCANF btw.
Re: Rob -
Edin Black - 12.05.2012
can you make this in strmcp ??
Re: Rob -
Edin Black - 12.05.2012
anyone ?