03.05.2017, 06:02
Hello guys.
I need help with this .. When Admin go /onduty i want something that can count time spended on duty, and when he goes /offduty to save time spended on duty .. is it possible ?
For Example : When go /onduty : Admin Micho is on duty! | Spendedtime: 21hr:21min
And after 30min when go /offduty : Admin Micho is on duty ! | Spendedtime : 21hr:51min
I need help with this .. When Admin go /onduty i want something that can count time spended on duty, and when he goes /offduty to save time spended on duty .. is it possible ?
For Example : When go /onduty : Admin Micho is on duty! | Spendedtime: 21hr:21min
And after 30min when go /offduty : Admin Micho is on duty ! | Spendedtime : 21hr:51min
pawn Код:
CMD:on(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] == 1)
{
new sg[128];
AdminDuty[playerid] = 1;
GetPlayerName(playerid,sg,MAX_PLAYER_NAME);
SetPlayerColor(playerid,COLOR_YELLOW);
SetPlayerHealth(playerid,999);
SetPlayerArmour(playerid,999);
SetPlayerSkin(playerid, 217);
format(sg,sizeof(sg),"{f79d27}ScorpionWorld RolePlay | {FFFFFF}Admin %s e na dolznost. [%d:%d:%d] ",sg,PlayerInfo[playerid][pHour], PlayerInfo[playerid][pMinute], PlayerInfo[playerid][pSecond]);
SendClientMessageToAll(COLOR_WHITE,sg);
}
pawn Код:
CMD:off(playerid,params[])
{
if(PlayerInfo[playerid][pAdmin] == 1 )
{
new sg[128];
AdminDuty[playerid] = 0;
GetPlayerName(playerid,sg,MAX_PLAYER_NAME);
SetPlayerHealth(playerid,100);
SetPlayerArmour(playerid,0);
SetPlayerColor(playerid,COLOR_WHITE);
new originalskin = PlayerInfo[playerid][pChar];
SetPlayerSkin(playerid, originalskin);
format(sg,sizeof(sg),"{f79d27}ScorpionWorld RolePlay | {FFFFFF}Admin %s vekje ne e na dolznost.",sg);
SendClientMessageToAll(COLOR_WHITE,sg);
}