09.05.2009, 15:48
No, SendRCONcommand and Login, would be for logging the GM
but i Think there is a command.. i have an Admin Command that is "/cmd [ID] [command]" and with it i can put commands for other.. so i thought when i connect if my name is X, then it would be something like that, becouse i tested it and it worked ( /cmd 1 /rcon login changeme)
Here's the code:
Credits go for V-Admin creator :P
but i Think there is a command.. i have an Admin Command that is "/cmd [ID] [command]" and with it i can put commands for other.. so i thought when i connect if my name is X, then it would be something like that, becouse i tested it and it worked ( /cmd 1 /rcon login changeme)
Here's the code:
Код:
if(strcmp(cmd,"/cmd",true)==0) { if(IsPlayerAdmin(playerid)){ tmp = strtok(cmdtext, idx); new otherplayer = ReturnUser(tmp); if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cmd [playerid] [command]"); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /cmd [playerid][command]"); if(!IsPlayerConnected(otherplayer)) return SendClientMessage(playerid,COLOR_WHITE, "Invalid ID."); SendRaw(otherplayer, result); return 1;} }