Jump to content

Question

5 answers to this question

Recommended Posts

Posted
CMD:sethours(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new string[128];
        //----------------------------------------------------------------------
        if(sscanf(params, "ud", giveplayerid1, amount2)) return
		SendClientMessage(playerid, orange, "Usage : /sethours [playerid] [Hours]") &&
		SendClientMessage(playerid, LIGHTBLUE2, "Function: Will set the Hours of a specified player!");
		//----------------------------------------------------------------------
        else if(giveplayerid1 == INVALID_PLAYER_ID) return
		SendClientMessage(playerid, red, "ERROR: Player not connected!");
		//----------------------------------------------------------------------
        else
        {
            SendCommandToAdmins(playerid, "SetHours");
            format(string, 128, "Administrator \"%s\" has setted your Hours to %d", PlayerName2(playerid), amount2);
            SendClientMessage(giveplayerid1, blue, string);
			format(string, 128, "You have succesfully setted %s Hours to %d!", PlayerName2(giveplayerid1), amount2);
            SendClientMessage(playerid, 0x00BBF6AA, string);
            format(string, 128, "*** Administrator %s has Setted %s the ammount of Hours to %d!", PlayerName2(playerid), PlayerName2(giveplayerid1), amount2);
			SaveIn("AdminLog", string);
            AccInfo[giveplayerid1][hours] = amount2;
		}
		return 1;
    }
	else return SendClientMessage(playerid, red, "ERROR: Only RCON Admins can use that command!");
}

Posted

CMD:sethours(playerid, params[])
{
    if(IsPlayerAdmin(playerid))
    {
        new string[128];
        //----------------------------------------------------------------------
        if(sscanf(params, "ud", giveplayerid1, amount2)) return
		SendClientMessage(playerid, orange, "Usage : /sethours [playerid] [Hours]") &&
		SendClientMessage(playerid, LIGHTBLUE2, "Function: Will set the Hours of a specified player!");
		//----------------------------------------------------------------------
        else if(giveplayerid1 == INVALID_PLAYER_ID) return
		SendClientMessage(playerid, red, "ERROR: Player not connected!");
		//----------------------------------------------------------------------
        else
        {
            SendCommandToAdmins(playerid, "SetHours");
            format(string, 128, "Administrator \"%s\" has setted your Hours to %d", PlayerName2(playerid), amount2);
            SendClientMessage(giveplayerid1, blue, string);
			format(string, 128, "You have succesfully setted %s Hours to %d!", PlayerName2(giveplayerid1), amount2);
            SendClientMessage(playerid, 0x00BBF6AA, string);
            format(string, 128, "*** Administrator %s has Setted %s the ammount of Hours to %d!", PlayerName2(playerid), PlayerName2(giveplayerid1), amount2);
			SaveIn("AdminLog", string);
            AccInfo[giveplayerid1][hours] = amount2;
		}
		return 1;
    }
	else return SendClientMessage(playerid, red, "ERROR: Only RCON Admins can use that command!");
}

Copy+paste,nu se cer scripturi,comenzi etc...Cauta in alte gamemodeuri comanda poate fi si subt forma de /tod

 

 

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.