The command is not
#3

This is not
Quote:
Код:
CMD:setname(playerid, params[])
{
	new playerb ,string[128], string2[128], file[64], idx, idx2, idx3, idx4, idx5, text[MAX_PLAYER_NAME];
   	if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
   	if(PlayerInfo[playerid][pAdmin] < 2 && !Approve[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
    if(Approve[playerid]) Approve[playerid] = 0;
//    if(!aDuty[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You are not on admin duty.");
	if(sscanf(params, "us[24]", playerb, text)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setname [playerid] [name]");
    if(aDuty[playerb]) return SendClientMessage(playerid, COLOR_GREY, "You can't set an admin on duty's name.");
    if(!IsPlayerLoggedIn(playerb)) return SendClientMessage(playerid, COLOR_GREY, "Invalid player id.");
    // Start of detecting space in name
	new end, temp[32], temp2[32];
	end = strfind(text, " ",true);
	if(end != -1)
	{
	    strmid(temp, text, 0, end);
	    format(temp, sizeof(temp), "%s_", temp);
	    strdel(text, 0, end);
		strmid(temp2, text, 1, strlen(text));
	    format(text, 24, "");
	    strcat(text, temp, sizeof(temp));
	    strcat(text, temp2, sizeof(temp2));
	}
Reply


Messages In This Thread
The command is not - by Shinobu - 17.04.2014, 05:10
Re: The command is not - by Dignity - 17.04.2014, 05:16
Re: The command is not - by Shinobu - 17.04.2014, 05:22
Re: The command is not - by Dignity - 17.04.2014, 05:33
Re: The command is not - by Shinobu - 17.04.2014, 05:36
Re: The command is not - by Dignity - 17.04.2014, 05:37
Re: The command is not - by Shinobu - 17.04.2014, 05:41
Re: The command is not - by Dignity - 17.04.2014, 05:43
Re: The command is not - by Scrillex - 17.04.2014, 06:03
Re: The command is not - by Dignity - 17.04.2014, 06:05

Forum Jump:


Users browsing this thread: 1 Guest(s)