06.02.2010, 15:37
Hello, well I tried to add a /help and /rules command and I get:
And here is my cmd's:
And right after that:
Put together:
pawn Код:
C:\Program Files (x86)\Rockstar Games\SA-MP Server 2\gamemodes\CMFS.pwn(86) : warning 209: function "OnPlayerCommandText" should return a value
C:\Program Files (x86)\Rockstar Games\SA-MP Server 2\gamemodes\CMFS.pwn(87) : error 055: start of function body without function header
C:\Program Files (x86)\Rockstar Games\SA-MP Server 2\gamemodes\CMFS.pwn(88) : error 010: invalid function or declaration
C:\Program Files (x86)\Rockstar Games\SA-MP Server 2\gamemodes\CMFS.pwn(96) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
3 Errors.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "------CMFS Help--------");
SendClientMessage(playerid, COLOR_GREEN, "We are a server that is in progress");
SendClientMessage(playerid, COLOR_GREEN, "We use fsdebug for now...");
SendClientMessage(playerid, COLOR_GREEN, "We hope to get a full script in a week to a month");
SendClientMessage(playerid, COLOR_GREEN, "Just bare with us and have fun");
SendClientMessage(playerid, COLOR_GREEN, "[CMDS]: /v /w /w2 /t /rules some others to....");
SendClientMessage(playerid, COLOR_GREEN, "You can ask a admin (If any) for more help and rules.");
return 1;
}
}
pawn Код:
{
if (strcmp("/rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "-------CMFS Rules--------");
SendClientMessage(playerid, COLOR_GREEN, "We don't really care what you do,");
SendClientMessage(playerid, COLOR_GREEN, "Just don't DM, you can have some fights with people,");
SendClientMessage(playerid, COLOR_GREEN, "And kill them but don't kill them otherwise.");
SendClientMessage(playerid, COLOR_GREEN, "And don't over spawn cars.");
SendClientMessage(playerid, COLOR_GREEN, "You can ask a admin (If any) for more help and rules.");
return 1;
}
}
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "------CMFS Help--------");
SendClientMessage(playerid, COLOR_GREEN, "We are a server that is in progress");
SendClientMessage(playerid, COLOR_GREEN, "We use fsdebug for now...");
SendClientMessage(playerid, COLOR_GREEN, "We hope to get a full script in a week to a month");
SendClientMessage(playerid, COLOR_GREEN, "Just bare with us and have fun");
SendClientMessage(playerid, COLOR_GREEN, "[CMDS]: /v /w /w2 /t /rules some others to....");
SendClientMessage(playerid, COLOR_GREEN, "You can ask a admin (If any) for more help and rules.");
return 1;
}
}
{
if (strcmp("/rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid, COLOR_GREEN, "-------CMFS Rules--------");
SendClientMessage(playerid, COLOR_GREEN, "We don't really care what you do,");
SendClientMessage(playerid, COLOR_GREEN, "Just don't DM, you can have some fights with people,");
SendClientMessage(playerid, COLOR_GREEN, "And kill them but don't kill them otherwise.");
SendClientMessage(playerid, COLOR_GREEN, "And don't over spawn cars.");
SendClientMessage(playerid, COLOR_GREEN, "You can ask a admin (If any) for more help and rules.");
return 1;
}
}