18.04.2010, 13:34
Okay so I made a /kill command.
This is my code
and when I press f5 in pwano that what I get
okay so lets delete onplayercomandtext
that what i have now
here is the error:
so here is my help and kill command
Please help me xD
This is my code
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/kill", cmdtext, true, 10) == 0) { SetPlayerHealth(playerid, 0); return 1; } return 0; }
Код:
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.
that what i have now
Код:
if (strcmp("/kill", cmdtext, true, 10) == 0) { SetPlayerHealth(playerid, 0); return 1; } return 0; }
Код:
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.
Код:
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; }