01.03.2014, 07:56
how can i add a date till when it should be disabled
Код:
dcmd_accountdisable(playerid, params[]) { new TargetID,Reason[64]; if(pInfo[playerid][Adminlevel] < 5) return SendClientMessage(playerid, COLOR_RED, ""ERROR_MESSAGE""); if(sscanf(params, "us", TargetID, Reason)) return SendClientMessage(playerid, COLOR_RED, "USAGE: /accountdisable [id] [Reason] [days]"); if(TargetID == INVALID_PLAYER_ID || !IsPlayerConnected(TargetID )) return SendClientMessage(playerid, COLOR_RED, "* Player Is Not Connected."); else { pInfo[TargetID][Adisable] =1; new str[128],str1[128],str2[128]; new targetname[MAX_PLAYER_NAME]; GetPlayerName(TargetID,targetname,24); format(str,sizeof(str),"%s (%d) Has Been Disabled By An Admin. Reason: %s", targetname, TargetID, Reason); SendClientMessageToAll(COLOR_HOTPINK, str); format(str1,sizeof(str1),"**KICK: %s (%d) (ACCOUNT DISABLED) Account Disabled", targetname, TargetID); SendClientMessageToAll(COLOR_HOTPINK, str1); format(str2,sizeof(str2),"This Account Has Been Disabled By An Admin"); KickWithMessage(COLOR_HOTPINK, str2); print(str); print(str1); } return 1; }