[Help] command / transfer (playerid) (amount) [Help] -
Dj_Paradox - 15.05.2011
Command / transfer (playerid) (amount) Already researched enough, but nothing that I think works = / I need a code for use with fcmd
Fcommands.
Re: [Help] command / transfer (playerid) (amount) [Help] -
Elka_Blazer - 15.05.2011
I can make you a cmd with sscanf/strtok dcmd/zcmd/strcmp
I never heard of fcmd I cant understand this language ....
Why cant you just make a regular CMD of strcmp and strtok ?
Re: [Help] command / transfer (playerid) (amount) [Help] -
sim_sima - 15.05.2011
Nah, dont use strcmp and strtok, use zcmd and sscanf
Re: [Help] command / transfer (playerid) (amount) [Help] -
Elka_Blazer - 15.05.2011
Yea .... I recommend you to use sscanf and dcmd/zcmd
Faster , Easier, Better, Shorter !
https://sampforum.blast.hk/showthread.php?tid=176372
This forum requires that you wait 120 seconds between posts. Please try again in 36 seconds.
OMG !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!
Re: [Help] command / transfer (playerid) (amount) [Help] -
Dj_Paradox - 15.05.2011
I do not like strcmp and strtok.
All my gamemode fcommands was mounted on the fcmd is good, but has several things I still did not understand well.
Can someone help me with this command? /transfer?
Re: [Help] command / transfer (playerid) (amount) [Help] -
Joe Staff - 15.05.2011
Lol, fcmd is a total rip off of zcmd. Just make a zcmd it change the to an f, littetally no difference. The "author" of fcmd clearly just rewrote zcmd with absolutely no imagination.
Re: [Help] command / transfer (playerid) (amount) [Help] -
NRJ53 - 15.05.2011
Well, if it was ZCMD and you was using SSCANF then:
pawn Код:
CMD:transfer(playerid, params[]){
new id, amount, cash;
if(sscanf(params,"ui", id, amount))
return SendClientMessage(playerid, 0xCECECEFF, "CMD: /transfer [player] [amount]");
if(!IsPlayerConnected(id))
return SendClientMessage(playerid, 0xCECECEFF, "Player is not connected");
cash = GetPlayerMoney(playerid);
if(amount > cash)
return SendClientMessage(playerid, 0xCECECEFF, "You do not have that much!");
if(amount < 1)
return SendClientMessage(playerid, 0xCECECEFF, "You can not transfer funds under 1!");
GivePlayerMoney(playerid, -amount);
GivePlayerMoney(id, amount);
SendClientMessage(playerid, 0xCECECEFF, "You sent the money.");
SendClientMessage(id, 0xCECECEFF, "You got given money.");
return 1;
}
Not tested!
Re: [Help] command / transfer (playerid) (amount) [Help] -
Dj_Paradox - 16.05.2011
@SilentHuntR
hahahahahaha.... Yeah man, but why have ridden in my entire gamemode fcmd, so I really need this command to terminate it, but this will be the last you see that I do something with fcmd.
@NRJ53
in fcmd fail =/