Help for a command /weather [ID OR NAME] - 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: Help for a command /weather [ID OR NAME] (
/showthread.php?tid=404815)
Help for a command /weather [string or number] -
nacimbogoss - 04.01.2013
Hi everybody !
I want to create a command /weather [Weather ID or Weather name] but I don't know how.
I use ZCMD and sscanf.
Example: /weather 16 or /weather rainy
Thanks.
Re: Help for a command /weather [ID OR NAME] -
Jimmy0wns - 05.01.2013
pawn Код:
if(strcmp(cmdtext, "/weather sun", true) == 0)
{
SetPlayerWeather(playerid, 0);
return 1;
}
For normal weather, just clouds no rain and sun.
pawn Код:
if(strcmp(cmdtext, "/weather sandstorm", true) == 0)
{
SetPlayerWeather(playerid, 19);
return 1;
}
etc etc.
Re: Help for a command /weather [ID OR NAME] -
nacimbogoss - 05.01.2013
I'm sorry but it's not what I need.
I want to create a ZCMD command with sscanf that you can use '/weather 16' for example and '/weather sunny' with an sscanf function.