Posts: 55
Threads: 14
Joined: Sep 2012
Reputation:
0
These are my commands.I will like for someone to help me add /cmds and /kill to my current /wfoggy and /help cmd.If I did something wrong please tell me.
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/wfoggy", cmdtext, true, 5) == 0)
{
SetWeather(09);
return 1;
}
if (strcmp("/help", cmdtext, true, 5) == 0)
{ // this one
SendClientMessage(playerid, COLOR_YELLOW, "(ZR Bot)-Welcome,pelase look at our /cmds and /rules!");
return 1;
} // and this one, same as above
return 1;
}
Posts: 55
Threads: 14
Joined: Sep 2012
Reputation:
0
Umm I got alot of errors doing what you did.Anyway,I am talking about adding the /cmds and /help too my current commands.
Posts: 55
Threads: 14
Joined: Sep 2012
Reputation:
0
its cool what im talking about I want you too add /cmds look like this
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/wfoggy", cmdtext, true, 5) == 0)
{
SetWeather(09);
return 1;
}
if (strcmp("/help", cmdtext, true, 5) == 0)
{ // this one
SendClientMessage(playerid, COLOR_YELLOW, "(ZR Bot)-Welcome,pelase look at our /cmds and /rules!");
return 1;
} // and this one, same as above
return 1;
}
if (strcmp("/cmds", cmdtext, true, 5) == 0)
{ // this one
SendClientMessage(playerid, COLOR_YELLOW, "(ZR Bot)- All of our commands so far are /help,/kill, and /cmds!");
return 1;
} // and this one, same as above
return 1;
}
Posts: 55
Threads: 14
Joined: Sep 2012
Reputation:
0
I did that but got some error's can you plz add that too my other 2 commands at top?
Posts: 55
Threads: 14
Joined: Sep 2012
Reputation:
0
Here are my 2 errors
C:\Documents and Settings\Owner\My Documents\GTA - San Andreas\Server\gamemodes\Z#.pwn(283) : error 010: invalid function or declaration
C:\Documents and Settings\Owner\My Documents\GTA - San Andreas\Server\gamemodes\Z#.pwn(286) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
2 Errors.
This what I did below
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp("/wfoggy", cmdtext, true, 5) == 0)
{
SetWeather(09);
return 1;
}
if (strcmp("/help", cmdtext, true, 5) == 0)
{ // this one
SendClientMessage(playerid, COLOR_YELLOW, "(ZR Bot)-Welcome,pelase look at our /cmds and /rules!");
return 1;
} // and this one, same as above
return 1;
}
if (strcmp("/cmds", cmdtext, true, 5) == 0) - this 283#
{
SendClientMessage(playerid, COLOR_YELLOW, "/wfoggy, /help");
return 1; - this is 286
}