[Help] command / transfer (playerid) (amount) [Help]
#1

Command / transfer (playerid) (amount) Already researched enough, but nothing that I think works = / I need a code for use with fcmd Fcommands.
Reply
#2

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 ?
Reply
#3

Nah, dont use strcmp and strtok, use zcmd and sscanf
Reply
#4

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 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!
Reply
#5

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?
Reply
#6

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.
Reply
#7

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!
Reply
#8

@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 =/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)