Weather - 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 (
/showthread.php?tid=608691)
Weather -
LifeRah - 04.06.2016
guys, i made this CMD for vips so that they can set there weather. But when a VIP writes /vweather the weather is changed but i want that a msg must be given saying "Weather Changed" when a vip changes the weather. Heres my code:-
PHP код:
CMD:vweather(playerid, params[])
{
if(GetPVarInt(playerid, "DonateRank") >= 1)
{
new pos, level;
if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /vweahter [weather id]");
level = strval(params[pos]);
if(level < 1 || level > 44) return SendClientMessage(playerid, 0xAA3333AA, " Please enter number of weather [1-44]");
SetWeather(level);
return true;
}
return false;
}
kindly tell me how to add "Weather Changed"
Re: Weather -
Stinged - 04.06.2016
Код:
CMD:vweather(playerid, params[])
{
if(GetPVarInt(playerid, "DonateRank") >= 1)
{
new pos, level;
if(isnull(params)) return SendClientMessage(playerid, 0xFFFFFFFF, "USAGE: /vweahter [weather id]");
level = strval(params[pos]);
if(level < 1 || level > 44) return SendClientMessage(playerid, 0xAA3333AA, " Please enter number of weather [1-44]");
SetWeather(level);
SendClientMessage(playerid, color, "Weather Changed"); // Use SendClientMessageToAll(color, "Weather Changed"); if you want everyone to see it
return true;
}
return false;
}
https://sampwiki.blast.hk/wiki/SendClientMessage