SA-MP Forums Archive
how to make like this (weather changer) - 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: how to make like this (weather changer) (/showthread.php?tid=436165)



how to make like this (weather changer) - Guest123 - 10.05.2013

hello can you fix this bug ?

i make /myweather script
but it failed beause if i use /myweather it show

Code:
INFO:You Was Changed You Weather To : (nothing)
after i use /myweather 1

Code:
INFO:You Was Changed You Weather To : 1
help me, i want make if i type /myweather

it show /myweather (weather id)

pawn Code:
if(strcmp(cmd, "/myweather", true) == 0)
    {
        new tmp[256];
        tmp = strtok(cmdtext,idx);
        SetPlayerWeather(playerid,strval(tmp));
        format(tmp, sizeof(tmp), "{FF8000}INFO:{B7FF00}You Was Changed You Weather To :{FF8000} %s", tmp);
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "{FF8000} %s{C0C0C0} has used {FF8000} /myweather", str);
        SendClientMessageToAll(0xFFFF00AA, str);
        SendClientMessage(playerid, COLOR_RED, tmp);
        return 1;
    }



Re : how to make like this (weather changer) - yusei - 10.05.2013

PHP Code:
if(strlen(tmp) == 0) return SendClientMessage(playerid, -1"/myweather (weather id)"); 



Re: how to make like this (weather changer) - Guest123 - 10.05.2013

nice Rep+