[FilterScript] Snow for 0.3c (fixed)
#35

if (strcmp("/snow", cmdtext, true, 5) == 0)
it will work for /snow[anything] (/snowrfgerg534tr will call this string)
so...
if (strcmp("/snowon", cmdtext, true, 7) == 0)
and
if (strcmp("/snowoff", cmdtext, true, 8 ) == 0)
will never called
P.S. and nothing snow to me
i think all who writed "cool script" and somethink like this even not tested it, wite just for post =\
=====
i made like this
Код:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/snow", cmdtext, true, 5) == 0)
    {
        new obj_id, msg[64];
        obj_id = CreatePlayerObject(playerid, 18864, 0, 0, 0, 0, 0, 0);
        AttachObjectToPlayer(obj_id, playerid, 1.5, 0.5, 0, 0, 1.5, 2);
        
        format(msg,sizeof(msg),"Object got ID %i", obj_id);
	    SendClientMessage(playerid,0xFFBF00FF,msg);
        return 1;
    }
    return 0;
}
just to test, and its not work, i see nothing >_<
ok, let's imagine that its work
1) Why in OnPlayerConnect you attach object to all player if you have command to turn off snow for all
2) For command /snow you have check IsPlayerAdmin(i) in incorrect spot, all users can use this command, but its turn on snow only for admins.
3) In /nosnow (that will never called, but let's use our imagination)
3.1) You destroy all objects, so why you need array SnowOff[MAX_PLAYERS] you dont use it, you just destroy objects
3.2) If you destroyed object in /nosnow and /snowoff, why you don't create it in /snow and /snowon? It will be very cool problems, you saved ID of object, then delete it, then other FS will create other object with ID thath you saved, and to some player, thath connected, you script will attach some random object, that created by other FS
?) If you have SnowOff[i] to detect fot what player use snow, for what not, reset it in On‌PlayerDisconnect
======
just show you your errors...
P.P.S. anybody tested it? it works? i can't make it work
P.P.P.S. work for me like thath:
Код:
#include <a_samp>

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/snow", cmdtext, true, 5) == 0)
    {
        new obj_id, msg[64], Float:sx, Float:sy, Float:sz;
        GetPlayerCameraPos(playerid,sx,sy,sz);
        obj_id=CreatePlayerObject(playerid,18864, sx, sy, sz-5, 0.0, 0.0, 0.0, 300.0);
        
        format(msg,sizeof(msg),"Object got ID %i", obj_id);
	    SendClientMessage(playerid,0xFFBF00FF,msg);
        return 1;
    }
    return 0;
}
use this only for testing, objects not destroying
Reply


Messages In This Thread
Snow for 0.3c (outdated) - by Cypress - 23.12.2010, 10:09
Re: Snow for 0.3c - by MixMash - 23.12.2010, 10:15
Re: Snow for 0.3c - by MisterTickle - 23.12.2010, 10:20
Re: Snow for 0.3c - by MestreKiller - 23.12.2010, 10:24
Re: Snow for 0.3c - by wups - 23.12.2010, 10:44
Re: Snow for 0.3c - by knackworst - 23.12.2010, 10:56
Re: Snow for 0.3c - by Noss* - 23.12.2010, 12:39
Re: Snow for 0.3c - by nielsbon1 - 23.12.2010, 12:59
Re: Snow for 0.3c - by gedux123775 - 23.12.2010, 13:00
Re: Snow for 0.3c - by nuriel8833 - 23.12.2010, 13:11
Re: Snow for 0.3c - by HyperZ - 23.12.2010, 13:56
Re: Snow for 0.3c - by kaamis - 23.12.2010, 14:03
Re: Snow for 0.3c - by Zh3r0 - 23.12.2010, 14:09
Re: Snow for 0.3c - by bender_ - 23.12.2010, 14:17
Re: Snow for 0.3c - by Tessar - 23.12.2010, 15:14
Re: Snow for 0.3c - by jonrb - 23.12.2010, 15:50
Re: Snow for 0.3c - by Cypress - 23.12.2010, 20:49
Re: Snow for 0.3c - by Ivan_Pantovic - 24.12.2010, 10:46
Re: Snow for 0.3c - by DVDK - 24.12.2010, 18:30
Re: Snow for 0.3c - by ToPhrESH - 25.12.2010, 02:47
Re: Snow for 0.3c - by Krx17 - 25.12.2010, 02:54
Re: Snow for 0.3c - by MrDeath537 - 25.12.2010, 05:39
Re: Snow for 0.3c - by SkizzoTrick - 25.12.2010, 10:50
Re: Snow for 0.3c - by justsomeguy - 25.12.2010, 15:34
Re: Snow for 0.3c - by Cypress - 27.12.2010, 10:28
Re: Snow for 0.3c - by justsomeguy - 27.12.2010, 22:57
Re: Snow for 0.3c (fixed) - by ExeC - 03.01.2011, 14:51
AW: Snow for 0.3c (fixed) - by MuLtiVaN - 08.02.2011, 13:53
Re: AW: Snow for 0.3c (fixed) - by justsomeguy - 08.02.2011, 16:14
Re: Snow for 0.3c (fixed) - by SkizzoTrick - 08.02.2011, 16:55
Re: Snow for 0.3c (fixed) - by Mean - 08.02.2011, 17:11
Re: Snow for 0.3c (fixed) - by bomm89 - 20.02.2011, 20:07
Re: Snow for 0.3c (fixed) - by MahmutBey - 20.02.2011, 20:08
Re : Snow for 0.3c (fixed) - by Varkoll_ - 20.02.2011, 21:25
Re: Snow for 0.3c (fixed) - by Ponchik - 21.02.2011, 04:32
Re: Snow for 0.3c (fixed) - by Cypress - 21.02.2011, 11:32
Re: Snow for 0.3c (fixed) - by titanak - 24.08.2011, 22:10
Re: Snow for 0.3c (fixed) - by ViniBorn - 25.08.2011, 00:18
Re: Snow for 0.3c (fixed) - by Michael_Henry - 29.09.2011, 14:19

Forum Jump:


Users browsing this thread: 9 Guest(s)