02.07.2012, 21:23
Код:
#include <a_samp> #define FILTERSCRIPT #define COLOR_PINK 0xFF66FFAA #define lightgreen 0x38FF06FF #define orange 0xFF9900AA #define COLOR_LEMON 0xDDDD2357 #define blue 0x375FFFFF public OnPlayerCommandText(playerid,cmdtext[]) { if(!strcmp(cmdtext, "/commands", true, 9)) { SendClientMessage(playerid, lightgreen, "Server Commands: /anims, /stopanim, /placefw, /launchfw, /votekick, /vehiclemenu, /sellhouse, /trunk, /park, /sellcar "); SendClientMessage(playerid, lightgreen, "/bank, /banktele, /neon, /lshospital, /lsairport, /lspd, /lvbikejump, /lvpyramid, /lvsniperspot, /lvcrane, /makemedrunk"); SendClientMessage(playerid, lightgreen, "/exitrace, /joinrace, /setplate, /findcar, /lock, /sellcarto, /housemenu, /afk, /back, /rob, /rape, /cureme, /hit, /hits, /cure"); SendClientMessage(playerid, lightgreen, "*RCON ONLY* /healme, /createhouse, /buildrace, /startrace, /stoprace, /ghcmds, /cage"); return 1; } } public OnPlayerDisconnect(playerid) { SendClientMessageToAll(orange, "A player has disconnected from the server."); return 1; } public OnPlayerConnect(playerid) { SendClientMessageToAll(lightgreen, "A player has connected to the server."); return 1; } if(!strcmp(cmdtext, "/healme", true, 7)) { if(IsPlayerAdmin(playerid)) SetPlayerHealth(playerid, 100) SetPlayerArmour(playerid, 100) SendClientMessage(playerid, blue, "You have restored your Health and Armour."); return 1; } public OnPlayerSpawn(playerid) { GivePlayerMoney(playerid, 600000) SendClientMessage(playerid, blue, "You have recieved 600k cash for spawning."); return 1; } if(!strcmp(cmdtext, "/rules", true, 6)) { SendClientMessage(playerid, orange, "NO DEATH-MATCHING! Respect other players. Be nice to admins (We don't have to let you play ;D)"); SendClientMessage(playerid, orange, "Please don't swear excessively. Cheats ARE allowed, but in moderation. Have Fun!!!"); return 1; } if (strcmp(cmdtext, "/makemedrunk", true) == 0) { SetPlayerDrunkLevel (playerid, 50000); SendClientMessage(playerid, blue, "You are now drunk, don't drink and drive!"); return 1; }
Код:
C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(19) : warning 209: function "OnPlayerCommandText" should return a value C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(33) : error 010: invalid function or declaration C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(35) : error 010: invalid function or declaration C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(39) : error 010: invalid function or declaration C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(45) : error 001: expected token: ";", but found "-identifier-" C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(48) : error 010: invalid function or declaration C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(52) : error 010: invalid function or declaration C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(55) : error 010: invalid function or declaration C:\Users\Noah\Desktop\Snowy server\filterscripts\cmds.pwn(59) : error 010: invalid function or declaration Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.