Whats wrong with this script?
#1

I keep getting errors but i dont see anything wrong with it.

Код:
public OnPlayerCommandText(playerid, cmdtext[])

	   (strcmp("/creds", cmdtext, true, 10) == 0)
	   {
	   SendClientMessage(playerid, 0x000000, "Pilotblaze1/Ryder3939. And **********.com");
	   return 1;
	 }
	 

	if (strcmp("/heal", cmdtext, true, 10) == 0)
	{
        SetPlayerHealth(playerid, 100)
        SendClientMessage(playerid, 0x000000, "You have been healed! You health has been restored to 100");
		return 1;
	 }
	 

    if (strcmp("/kill", cmdtext, true, 10) == 0)
    {
        SetPlayerHealth(playerid, 0);
        SendClientMessageToAll(0x000000, "Someone has commited suicide! Check the right side of your screen to see who it was.");
        SendClientMessage(playerid, 0x000000, "See you in heaven! Oh i just remembered,you commited suicide, you aint goin.");
        return 1;
	}
	
	if (strcmp("/pm", cmdtext, true, 10) == 0)
	{
         SendClientMessage(playerid, COLOR_RED, "Unfortunately, I do not know how to script /pm yet, So your assed out.");
		return 1;
	}
	return 0;
}
Reply
#2

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/creds", true))
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "Pilotblaze1/Ryder3939. And **********.com");
        return 0x1;
    }
   
    if(!strcmp(cmdtext, "/heal", true))
    {
        SetPlayerHealth(playerid, 0);
        SendClientMessageToAll(0xFFFFFFAA, "Someone has commited suicide! Check the right side of your screen to see who it was.");
        SendClientMessage(playerid, 0xFFFFFFAA, "See you in heaven! Oh i just remembered,you commited suicide, you aint goin.");
        return 0x1;
    }
   
    if(!strcmp(cmdtext, "/kill", true))
    {
        SendClientMessage(playerid, 0xFFFFFFAA, "Pilotblaze1/Ryder3939. And **********.com");
        return 0x1;
    }
   
    if(!strcmp(cmdtext, "/pm", true))
    {
        SendClientMessage(playerid, COLOR_RED, "Unfortunately, I do not know how to script /pm yet, So your assed out.");
        return 0x1;
    }
    return 0x0;
}
Reply
#3

Please remove my post, I posted in the wrong topic >.<
Reply
#4

That's just a hex with a value of 1 or true. 0x0 = 0, or false;
Reply
#5

Quote:
Originally Posted by Colossus_
Посмотреть сообщение
Is there any benifits for using that?

0x0 is also a colour define xD

EDIT a BLACK colour define.
No advantage at all. It just makes it harder for some people to understand that meaning behind it. You can read more about it on a tutorial posted somewhere in the forums.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)