public OnPlayerConnect(playerid){ SetPVarInt(playerid, \"Radios\", 0); return 1;} CMD:setradios(playerid, params[]){ if(IsPlayerAdmin(playerid)) { new string[128], name[MAX_PLAYER_NAME], PID; if(sscanf(params, \"u\", PID)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /setradios <Játékos név/ID>\"); if(PID == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Rossz id!\"); SetPVarInt(PID, \"Radios\", 1); GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(string, sizeof(string), \"Adtál %s-nek/nak rádiós rangot!\", name); SendClientMessage(playerid, 0x33CCFFAA, string); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy admin!\"); } return 1;}CMD:radios(playerid, params[]){ if(GetPVarInt(playerid, \"Radios\") == 1) { new szoveg[128]; if(sscanf(params, \"s[128]\", szoveg)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /radios <szöveg>\"); format(szoveg, sizeof(szoveg), \"Rádiós: %s\", szoveg); SendClientMessageToAll(0x33FF33AA, szoveg); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy rádiós!\"); } return 1;}
#include <a_samp>#include <zcmd>#include <sscanf2>public OnPlayerConnect(playerid){ SetPVarInt(playerid, \"Radios\", 0); return 1;} CMD:setradios(playerid, params[]){ if(IsPlayerAdmin(playerid)) { new string[128], name[MAX_PLAYER_NAME], PID; if(sscanf(params, \"u\", PID)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /setradios <Játékos név/ID>\"); if(PID == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, \"Rossz id!\"); SetPVarInt(PID, \"Radios\", 1); GetPlayerName(playerid, name, MAX_PLAYER_NAME); format(string, sizeof(string), \"Adtál %s-nek/nak rádiós rangot!\", name); SendClientMessage(playerid, 0x33CCFFAA, string); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy admin!\"); } return 1;}CMD:radios(playerid, params[]){ if(GetPVarInt(playerid, \"Radios\") == 1) { new szoveg[128]; if(sscanf(params, \"s[128]\", szoveg)) return SendClientMessage(playerid, 0xFF0000AA, \"Használat: /radios <szöveg>\"); format(szoveg, sizeof(szoveg), \"Rádiós: %s\", szoveg); SendClientMessageToAll(0x33FF33AA, szoveg); } else { SendClientMessage(playerid, 0xFF0000AA, \"Nem vagy rádiós!\"); } return 1;}