[HELP] small problem
#1

Only kills the money from a player who has 0 id.

Код:
CMD:atimtipinigus(playerid, params[])
{
    new
        zaidejoid,
        giveplayerid,
        cashamount;
    if(ALygis[playerid] < 4) return SendClientMessage(playerid,raudona,"[FunZoneLT]>> Jus negalite naudoti sitos komandos.");
    if(sscanf(params, "ui", giveplayerid, cashamount)) return SendClientMessage(playerid, raudona, "{FBDF89}[FunZoneLT]>> /atimtipinigus [zaidejoid] [kiek]");
    if(giveplayerid == INVALID_PLAYER_ID ) return SendClientMessage(playerid, raudona, "[FunZoneLT]>> Tokio zaidejo nera.");
    new string[100], zvardas[MAX_PLAYER_NAME], vardas[MAX_PLAYER_NAME];
    GetPlayerName(zaidejoid, zvardas, sizeof(zvardas));
    GetPlayerName(playerid, vardas, sizeof(vardas));
    format(string, sizeof(string), "[FunZoneLT]>> Jus atemete pinigus is %s.", zvardas);
    SendClientMessage(playerid, COLOR_LIMEGREEN, string);
    format(string, sizeof(string), "[FunZoneLT]>> Jums ateme pinigus Administratorius %s.", vardas);
    SendClientMessage(zaidejoid, COLOR_LIMEGREEN, string);
    GivePlayerMoney(playerid, -cashamount);
    return 1;
}
Reply
#2

pawn Код:
GivePlayerMoney( giveplayerid, -cashamount );
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)