Weather Script Bug ! please help me
#1

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 ?!
Reply
#2

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...
Reply
#3

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!
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)