The command is not
#1

Command must have the suffix does not help.
Reply
#2

Could you emphasise more on what is wrong?

Also, please post your code.
Reply
#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
#4

What's wrong with it?
Reply
#5

Quote:
Originally Posted by Mionee
Посмотреть сообщение
What's wrong with it?
All commands must be followed by the id or unavailable.
Reply
#6

So you want to be able to do /setname [name] only for yourself?
Reply
#7

Quote:
Originally Posted by Mionee
Посмотреть сообщение
So you want to be able to do /setname [name] only for yourself?
yes
And / veh was unavailable eg.
Reply
#8

Not sure if it works, you left out a bit of the command. If you want me to change your vehicle command, you need to show the code to me and tell me what you want changed.

pawn Код:
CMD:setname(playerid, params[])
{
    new 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, "s[24]", text)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setname [name]");
    // 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
#9

That command will not work.. Because new playerb = the player who you will set = playerid for your self...

You need to define playerb.. to get players id...

Okay he was asking for it.. But that is really weird ..
Reply
#10

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
That command will not work.. Because new playerb = the player who you will set = playerid for your self...

You need to define playerb.. to get players id...
He asked for playerb to be removed.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)