help with admin color plz!!!!
#5

Quote:
Originally Posted by rjjj
Посмотреть сообщение
Here is the problem :

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/aco", cmdtext, true, 10) == 0)
	{
		SendClientMessage(playerid,0xFF0000AA,"admin color on");
		SetPlayerColor(playerid,0xFF0000AA);
		return 1;
	}
	if (strcmp("/acoff", cmdtext, true, 10) == 0)
	{
		SetPlayerColor(playerid, 0xFFFFFFAA);
		return 1;
	}
	return 0;
}
You have to change this numbers to the length of the command's name string .


Here, it should solve your problem :


pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/aco", cmdtext, true, 4) == 0)
    {
        SendClientMessage(playerid,0xFF0000AA,"admin color on");
        SetPlayerColor(playerid,0xFF0000AA);
        return 1;
    }
    if (strcmp("/acoff", cmdtext, true, 6) == 0)
    {
        SetPlayerColor(playerid, 0xFFFFFFAA);
        return 1;
    }
    return 0;
}

I hope that i have helped .
no it dint work
Reply


Messages In This Thread
help with admin color plz!!!! - by sampx - 01.07.2011, 15:24
Re: help with admin color plz!!!! - by JaTochNietDan - 01.07.2011, 15:59
Re: help with admin color plz!!!! - by rjjj - 01.07.2011, 16:03
Re: help with admin color plz!!!! - by JaTochNietDan - 01.07.2011, 16:07
Re: help with admin color plz!!!! - by sampx - 01.07.2011, 16:08
Re: help with admin color plz!!!! - by JaTochNietDan - 01.07.2011, 16:09
Re: help with admin color plz!!!! - by sampx - 01.07.2011, 16:13
Re: help with admin color plz!!!! - by rjjj - 01.07.2011, 16:23
Re: help with admin color plz!!!! - by Shadoww5 - 01.07.2011, 21:33
Re: help with admin color plz!!!! - by =WoR=Varth - 02.07.2011, 00:06
Re: help with admin color plz!!!! - by SmileyForCheat - 02.07.2011, 01:16
Re: help with admin color plz!!!! - by Shadoww5 - 02.07.2011, 13:55
Re: help with admin color plz!!!! - by sampx - 04.07.2011, 01:41

Forum Jump:


Users browsing this thread: 1 Guest(s)