Weather Script Bug ! please help me - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Weather Script Bug ! please help me (
/showthread.php?tid=364942)
Weather Script Bug ! please help me -
hackerspiffy - 01.08.2012

I made a script: (weather)
CMD:w( playerid, params[ ] )
{
if ( !strlen( params ) )
{
SendClientMessage( playerid, COLOR_WHITE, "/w [0-45]" );
return ( 1 );
}
new w = strval( params );
if(w < 0 || w > 45)
{
SendClientMessage(playerid, COLOR_GREY, "/w [0-45]");
return ( 1 );
}
SetPlayerWeather(playerid, w);
return 1;
}
When i use /w (weather) command more times server closed .

someone can help me to fix this bug ?!
Re: Weather Script Bug ! please help me -
Cjgogo - 01.08.2012
pawn Код:
CMD:w(playerid,params[ ] )
{
new w;
if (strval(params)) return SendClientMessage( playerid, COLOR_WHITE, "/w [0-45]" );
w=strval(params);
if(w < 0 || w > 45) return SendClientMessage(playerid, COLOR_GREY, "/w [0-45]");
else
{
SetPlayerWeather(playerid, w);
}
return 1;
}
There you go...
Re: Weather Script Bug ! please help me -
hackerspiffy - 01.08.2012
Quote:
Originally Posted by Cjgogo
pawn Код:
CMD:w(playerid,params[ ] ) { new w; if (strval(params)) return SendClientMessage( playerid, COLOR_WHITE, "/w [0-45]" ); w=strval(params); if(w < 0 || w > 45) return SendClientMessage(playerid, COLOR_GREY, "/w [0-45]"); else { SetPlayerWeather(playerid, w); } return 1; }
There you go...
|
Thanks man now it works. Awesome!