24.04.2009, 23:31
ok , i've searched but nothings what i really wanted or most of this is todo with CMDTEXT ones.
Im using DCMD and atempting to create "/kick [playerid] [reason]"
Once using the command it displys : "Administrator Aaron has kicked Guest (Reason: 0)"
0 would be the Guest's ID.
i dont know how to get this to display my reason.
Someone be kind and help
Im using DCMD and atempting to create "/kick [playerid] [reason]"
Код:
dcmd_kick(playerid, params[]) { new tmp[256],tmp2[256],Index; tmp = strtok(params,Index); tmp2 = strtok(params,Index); new otherid = strval(tmp); new reason = strval(tmp2); if (dini_Int(GetPlayerPath(playerid), "admin") >= 3) { if (IsPlayerConnected(otherid)) { if (strlen(tmp) && strlen(tmp2)) { new player[MAX_PLAYER_NAME]; new admin[MAX_PLAYER_NAME]; new string[256]; GetPlayerName(playerid, player, sizeof(player)); GetPlayerName(playerid, admin, sizeof(admin)); format(string, sizeof(string), "Administrator %s kicked %s (Reason: %d)", admin, player, reason); SendClientMessageToAll(COLOR_WHITE, string); Kick(otherid); } else { SendClientMessage(playerid, COLOR_WHITE, "[USAGE] : /kick [playerid] [reason]"); return 1; } } else { SendClientMessage(playerid, COLOR_WHITE, "That player is not online!"); return 1; } } else { SendClientMessage(playerid, COLOR_WHITE, "You dont have permission to access this command!"); return 1; } return 1; }
0 would be the Guest's ID.
i dont know how to get this to display my reason.
Someone be kind and help