Weather Change Error + Commands
#1

Here are my commands for my zombie server.

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 5) == 0)
{
SendClientMessage(playerid, COLOR_YELLOW, "(ZR Bot)-The owner of this server is [ZR]nicholas1 and [ZR]Survivor!");
SendClientMessage(playerid, COLOR_YELLOW, "(ZR Bot)-Also,the commands in this server are /help and /kill more are coming soon!");
return 1;
}
if (strcmp("/kill", cmdtext, true, 5) == 0)

SetPlayerHealth(playerid, 0);
return 1;

if(strcmp("/wfoggy", cmdtext, true, 5) == 0)

SetWeather(09);
return 1;

For, if(strcmp("/wfoggy", cmdtext, true, 5) == 0) .When I compile I get this.
C:\Documents and Settings\Owner\My Documents\GTA - San Andreas\Server\gamemodes\Z#.pwn(241) : warning 225: unreachable code

Also,if ya see anything wrong with me too add more commands like.For example,/credits for people to see owner and co-owner like that please post it also in reply.I will be so happy.
Reply
#2

Here you go -

Код:
if(strcmp("/wfoggy", cmdtext, true, 5) == 0)
{
SetWeather(09);
return 1;
}

if (strcmp("/kill", cmdtext, true, 5) == 0)
{ // this one
SetPlayerHealth(playerid, 0);
return 1;
} // and this one, same as above
You've forgotten to put the brackets
Reply
#3

Thanks help me out alot and I am also coming to your server for a visit
Reply
#4

thanks once again
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)