CMD:givecash(playerid, params[]) { new tmp[256];tmp = strtok(cmdtext, idx);if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"Tipp: {00ff33}/givecash [iD] [Összeg]\"); return 1;}giveplayerid = strval(tmp);tmp = strtok(cmdtext, idx);if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"Tipp: {00ff33}/utal [iD] [Összeg]\"); return 1;} moneys = strval(tmp);//printf(\"givecash_command: %d %d\",giveplayerid,moneys); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); playermoney = GetPlayerMoney(playerid); if (moneys > 0 && playermoney >= moneys) { GivePlayerMoney(playerid, (0 - moneys)); GivePlayerMoney(giveplayerid, moneys); format(string, sizeof(string), \"{fff200}Küldtél {00ff33}%s{fff200}(ID: {00ff33}%d{fff200})-nak/-nek, {00ff33}$%d-t .\", giveplayer,giveplayerid, moneys); SendClientMessage(playerid, COLOR_YELLOW, string); format(string, sizeof(string), \"{fff200}Kaptál {00ff33}$%d{fff200}-t %s(ID: {00ff33}%d){fff200}-tól/-tõl.\", moneys, sendername, playerid); SendClientMessage(giveplayerid, COLOR_YELLOW, string); printf(\"{00ff33}%s{fff200}(ID:{00ff33}%d{fff200}) küldött {00ff33}%d${fff200}-t {00ff33}%s{fff200}(ID:{00ff33}%d{fff200}){fff200}-nak/-nek\",sendername, playerid, moneys, giveplayer, giveplayerid); } else { SendClientMessage(playerid, COLOR_YELLOW, \"Nincs nállad ennyi pénz.\"); }}else { format(string, sizeof(string), \"{ff00a6}%d {fff200}nem ONLINE játékos.\", giveplayerid); SendClientMessage(playerid, COLOR_YELLOW, string); }return 1;}
CMD:givecash(playerid, params[]){ new giveplayerid, amount, string[128]; if(sscanf(params, \"ud\", giveplayerid, amount)) SendClientMessage(playerid, COLOR_RED, \"Használat: /givecash (név/ID) (összeg)\"); else if(giveplayerid == INVALID_PLAYER_ID) SendClientMessage(playerid, COLOR_RED, \"Játékos nincs csatlakozva!\"); else if(amount > GetPlayerMoney(playerid)) SendClientMessage(playerid, COLOR_RED, \"Helytelen átutalási tranzakció!\"); else if(giveplayerid == playerid) SendClientMessage(playerid, COLOR_RED, \"Magadnak nem küldhetsz pénzt!\"); else { GivePlayerMoney(giveplayerid, amount);GivePlayerMoney(playerid, 0 - amount);GetPlayerName(giveplayerid,string,sizeof(string));format(string, sizeof(string),\"$%d-t küldtél %s-nak/nek!\",amount,string);SendClientMessage(playerid,COLOR_GREEN,string);GetPlayerName(playerid,string,sizeof(string));format(string, sizeof(string),\"$%d-t kaptál %s-tól/tõl!\",amount,string);SendClientMessage(giveplayerid,COLOR_GREEN,string); } return 1;}
CMD:givecash(playerid, params[]) { new tmp[256];tmp = strtok(cmdtext, idx);if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"Tipp: {00ff33}/givecash [iD] [Összeg]\"); return 1;}giveplayerid = strval(tmp);tmp = strtok(cmdtext, idx);if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, \"Tipp: {00ff33}/givecash [iD] [Összeg]\"); return 1;} moneys = strval(tmp);//printf(\"givecash_command: %d %d\",giveplayerid,moneys); if (IsPlayerConnected(giveplayerid)) { GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); playermoney = GetPlayerMoney(playerid); if (moneys > 0 && playermoney >= moneys) { GivePlayerMoney(playerid, (0 - moneys)); GivePlayerMoney(giveplayerid, moneys); format(string, sizeof(string), \"{fff200}Küldtél {00ff33}%s{fff200}(ID: {00ff33}%d{fff200})-nak/-nek, {00ff33}$%d-t .\", giveplayer,giveplayerid, moneys); SendClientMessage(playerid, COLOR_YELLOW, string); format(string, sizeof(string), \"{fff200}Kaptál {00ff33}$%d{fff200}-t %s(ID: {00ff33}%d){fff200}-tól/-tõl.\", moneys, sendername, playerid); SendClientMessage(giveplayerid, COLOR_YELLOW, string); printf(\"{00ff33}%s{fff200}(ID:{00ff33}%d{fff200}) küldött {00ff33}%d${fff200}-t {00ff33}%s{fff200}(ID:{00ff33}%d{fff200}){fff200}-nak/-nek\",sendername, playerid, moneys, giveplayer, giveplayerid); } else { SendClientMessage(playerid, COLOR_YELLOW, \"Nincs nállad ennyi pénz.\"); }}else { format(string, sizeof(string), \"{ff00a6}%d {fff200}nem ONLINE játékos.\", giveplayerid); SendClientMessage(playerid, COLOR_YELLOW, string); }return 1;}