05.02.2012, 21:18
I'm having a problem, i downloaded an gamemmode, all commands are with ''!'' not with ''/'' It uses dutils.inc.
Can you help me? How can i get ''/''
Can you help me? How can i get ''/''
public OnPlayerText(playerid, text[])
{
new cmd[256], tmp[256], idx;
cmd = strtok(text, idx);
tmp = strtok(text, idx);
if(strcmp(cmd, "!makeadmin", true) == 0)
{
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, White, "Console: You're not authorised to use"), SendClientMessage(playerid, White, "this command");
if(!strlen(tmp)) return SendClientMessage(playerid, White, "Console: {FF0000}Usage: {FFFFFF}!makeadmin [playerid]");
if(!IsPlayerConnected(strval(tmp))) return SendClientMessage(playerid, White, "Console: {FF0000}Invalid{FFFFFF} player id!");
if(IsAdmin(strval(tmp))) return SendClientMessage(playerid, White, "Console: The player is already Admin.");
new other = strval(tmp);
new otherip[200], file[200], name[128], oname[128];
new afor[128], ofor[128];
GetPlayerIp(other, otherip, sizeof(otherip));
GetPlayerName(playerid, name, sizeof(name));
GetPlayerName(other, oname, sizeof(oname));
format(file, sizeof(file), aFile, otherip);
format(afor, sizeof(afor), "{FFFFFF}Console: You've promote {33FF33}%s [IP: %s]{FFFFFF} to Admin", oname, otherip);
format(ofor, sizeof(ofor), "{FFFFFF}Console: You've been promote to Admin by {33FF33}Rcon %s", name);
file_create(file);
SendClientMessage(playerid, White, afor);
SendClientMessage(other, White, ofor);
return 1;
{