A problem on setweather -
LasTRace - 17.06.2010
if(strcmp(cmdtext, "/setweather", true) == 0)
{
tmp=strtok(cmdtext,idx);
if(!strlen(tmp)) return SendClientMessage(playerid,COLOR_RED,"/setweather [weather id]");
new weather=strval(tmp);
new ppName[24];
if(weather > 45 || weather < 0) return SendClientMessage(playerid,COLOR_RED,"Invalid weather number!");
SetWeather(weather);
GetPlayerName(playerid, ppName, sizeof(ppName));
format(string, sizeof(string), "Mod Message: %s has changed weather to id %d.", ppName, weather);
SendModMsg(mwhite, string);
return 1;
}
when i type /weather, "/setweather [weather id]" appears, but when i type /setweather x, it says "SERVER: Unknow cmd". i cant see any wrong think here, can some1 help me?
Re: A problem on setweather -
dcmd_crash - 17.06.2010
You should use ZCMD & sscanf 2.0. much much much easier.
tyre fucker
Re: A problem on setweather -
LasTRace - 17.06.2010
Quote:
Originally Posted by _❼_
tyre fucker
|
/q
well, i'll check for it.
Re: A problem on setweather -
LasTRace - 18.06.2010
Does anyone helP??
Re: A problem on setweather -
Vince - 18.06.2010
Check your code and see what happens:
Код:
new weather = strval("x")
This returns 0 or -1, or it may not work at all.
Re: A problem on setweather -
LasTRace - 18.06.2010
Quote:
Originally Posted by Vince0789
Check your code and see what happens:
Код:
new weather = strval("x")
This returns 0 or -1, or it may not work at all.
|
nah, still the same
Re: A problem on setweather -
Despare - 18.06.2010
Could you post your /weather command?
Re: A problem on setweather -
Antonio [G-RP] - 18.06.2010
Quote:
Originally Posted by |>Daniel<|
Could you post your /weather command?
|
I do believe its at the top..
Re: A problem on setweather -
Despare - 18.06.2010
Quote:
Originally Posted by ♂ Antonio [G-RP
]
Quote:
Originally Posted by |>Daniel<|
Could you post your /weather command?
|
I do believe its at the top..
|
That's /setweather.
Quote:
when i type /weather, "/setweather [weather id]" appears, but when i type /weather x, it says "SERVER: Unknow cmd". i cant see any wrong think here, can some1 help me?
|
Re: A problem on setweather -
LasTRace - 18.06.2010
sorry, my fault, its not /Weather >> /setweather, im so sorry