Wow? I got a small problem help please.
#1

Okay so I made a /kill command.
This is my code
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/kill", cmdtext, true, 10) == 0)
	{
	SetPlayerHealth(playerid, 0);
		return 1;
	}
	return 0;
}
and when I press f5 in pwano that what I get
Код:
C:\Documents and Settings\Alex\Desktop\samp\gamemodes\howtomakegm.pwn(85) : error 021: symbol already defined: "OnPlayerCommandText"
C:\Documents and Settings\Alex\Desktop\samp\gamemodes\howtomakegm.pwn(89) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
okay so lets delete onplayercomandtext

that what i have now
Код:
	if (strcmp("/kill", cmdtext, true, 10) == 0)
	{
	SetPlayerHealth(playerid, 0);
		return 1;
	}
	return 0;
}
here is the error:
Код:
C:\Documents and Settings\Alex\Desktop\samp\gamemodes\howtomakegm.pwn(84) : error 010: invalid function or declaration
C:\Documents and Settings\Alex\Desktop\samp\gamemodes\howtomakegm.pwn(87) : error 010: invalid function or declaration
C:\Documents and Settings\Alex\Desktop\samp\gamemodes\howtomakegm.pwn(89) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
so here is my help and kill command

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/help", cmdtext, true, 10) == 0)
	{
  SendClientMessage(playerid, 0xC0C0C0FF, "Help Commands");
  SendClientMessage(playerid, 0xC0C0C0FF, "Type /kill to kill your self");
  SendClientMessage(playerid, 0xC0C0C0FF, "Type /q to quit the server");
	}
	return 0;
}
	if (strcmp("/kill", cmdtext, true, 10) == 0)
	{
	SetPlayerHealth(playerid, 0);
		return 1;
	}
	return 0;
}
Please help me xD
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)