if(strcmp(cmd, \"/ad\", true) == 0) { new tmp[258]; tmp = strtok(cmdtext, szoveg); if(GetPlayerMoney(playerid) < 100) return SendClientMessage(playerid, COLOR_RED, \"Nincs elég pénzed, $100 kellene!\"); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_YELLOW, \"Használat: /ad [hírdetés]\"); if(IsPlayerConnected(playerid)) { GetPlayerName(playerid, pName, sizeof(pName)); format(string, sizeof(string), \"Hírdetés: %s, Feladó: %s\", tmp, pName); GivePlayerMoney(playerid, -100); SendClientMessage(playerid, COLOR_WHITE, \"Hírdetés feladva, $100-ba került!\"); SendClientMessageToAll(COLOR_GREEN, string);}return 1;}
if(strcmp(cmd, \"/givemoney\", true) == 0){ if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, COLOR_YELLOW, \"Te nem vagy RCON admin!\"); new tmp1[128]; new tmp2[128]; new ammount, id; new pname[MAX_PLAYER_NAME];new oname[MAX_PLAYER_NAME]; tmp1 = strtok(cmdtext, id); tmp2 = strtok(cmdtext, ammount); if(strlen(tmp1)) return SendClientMessage(playerid, COLOR_WHITE, \"Nem írtad be az id-et!\"); if(strlen(tmp2)) return SendClientMessage(playerid, COLOR_WHITE, \"Nem írtál összeget\"); ammount = strval(tmp2);id = strval(tmp1);if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_GREEN, \"A beírt azonosító nincs a szerveren\");if(ammount < 1 || ammount > 1000) return SendClientMessage(playerid, COLOR_GREEN, \"Érvénytelen összeg!\");GetPlayerName(playerid, pname, sizeof(pname));GetPlayerName(id, oname, sizeof(oname));GivePlayerMoney(id, ammount);format(string, sizeof(string), \"Adtál $%d-t %s-nak/nek\", ammount, oname);SendClientMessage(playerid, COLOR_GREEN, string);format(string, sizeof(string), \"Kaptál $%d-t %s-tõl/tól\", ammount, pname);SendClientMessage(id, COLOR_GREEN, string);return 1;}
public OnPlayerCommandText( playerid , cmdtext[] ){new idx;new gid; new money;new kj[24]; new pn[24]; new str[60]; new cmd[256];cmd = strtok(cmdtext, idx);if(strcmp(cmd,\"/givecash\", true) == 0){cmd = strtok(cmdtext, idx);if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_TAN,\"Használat: /givecash [iD] (Összeg)\"),1;gid = strval(cmd);cmd = strtok(cmdtext, idx);if(!strlen(cmd)) return SendClientMessage(playerid,COLOR_TAN,\"Használat: /givecash [iD] (Összeg)\"),1;money = strval(cmd);if(GetPlayerMoney(playerid) < 0) return SendClientMessage(playerid,COLOR_RED,\"Nincs elég összeg nálad!!\"),1;if(playerid == gid) return SendClientMessage(playerid,COLOR_RED,\"Magadnak nem utalhatsz!!\");if(IsPlayerConnected(gid)){ GetPlayerName(playerid,pn,sizeof(pn)); GetPlayerName(gid,kj,sizeof(kj)); format(str,sizeof(str),\"Utaltál %s-nek(nak( $%d-t.\", kj , money ); SendClientMessage(playerid,COLOR_GREEN, str); format(str,sizeof(str),\"%s Utalt neked $%d-t.\", pn , money ); SendClientMessage(gid,COLOR_GREEN, str);GivePlayerMoney(playerid,GetPlayerMoney(playerid)-money);GivePlayerMoney(gid,money);return 1;}else SendClientMessage(playerid,COLOR_RED,\"Érvénytelen ID!!\");return 1;}return 0;}
if(strcmp(cmd,\"/hirdet\",true) == 0) {{tmp = strtok(cmdtext, idx);if(!strlen(tmp)) {SendClientMessage(playerid,COLOR_WHITE,\"HASZNÁLAT: /hirdet <Üzenet>\");return 1;}new pname[256]; GetPlayerName(playerid, pname, 256);format(string,sizeof(string),\"Hírdetés: %s | Feladó: %s\",cmdtext[7], pname);SendClientMessageToAll(COLOR_GREEN,string);}return 1;}