[FilterScript] Raimbow Man [Skin change with time]
#1

I made a very simple filterscript,
automatically change skins 1s
FS is funny
if you like you can take
and you can change the time
add more skins and skins
I just added five skins

Credit to v0nz

photo hosting

image upload no compression

image hosting 15mb

image hosting above 5 mb

online photo sharing

Download
Reply
#2

pawn Код:
//================ Rainbow Man ==========
//======= By Teddy ============
#include <a_samp>
#define COLOR_RED 0xFF0000FF
new CTimer1;
new CTimer2;
new CTimer3;
new CTimer4;
new CTimer5;
forward Color1(playerid);
forward Color2(playerid);
forward Color3(playerid);
forward Color4(playerid);
forward Color5(playerid);

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Rainbow Skin - by Teddy.        ");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rainbowman", cmdtext, true, 14) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, "Rainbow Man has been turned on.");
            KillTimer(CTimer2);
            KillTimer(CTimer3);
            KillTimer(CTimer4);
            KillTimer(CTimer5);
            CTimer1 = SetTimerEx("Color1", 500, 0, "d" ,playerid);
        }
    }
    if (strcmp("/rainbowmanoff", cmdtext, false, 14) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, "Rainbow Man has been turned off.");
            KillTimer(CTimer1);
            KillTimer(CTimer2);
            KillTimer(CTimer3);
            KillTimer(CTimer4);
            KillTimer(CTimer5);
            TogglePlayerControllable(playerid, 1);
        }
    }
}

public Color1(playerid)
{
   KillTimer(CTimer1);
   SetPlayerSkin(playerid, 19);
   CTimer2 = SetTimerEx("Color2", 500, 0, "d" ,playerid);
}

public Color2(playerid)
{
   KillTimer(CTimer2);
   SetPlayerSkin(playerid, 22);
   CTimer3 = SetTimerEx("Color3", 500, 0, "d" ,playerid);
}

public Color3(playerid)
{
   KillTimer(CTimer3);
   SetPlayerSkin(playerid, 84);
   CTimer4 = SetTimerEx("Color4", 500, 0, "d", playerid);
}

public Color4(playerid)
{
   KillTimer(CTimer4);
   SetPlayerSkin(playerid, 115);
   CTimer5 = SetTimerEx("Color5", 500, 0, "d" ,playerid);
}

public Color5(playerid)
{
   KillTimer(CTimer5);
   SetPlayerSkin(playerid, 293);
   SetTimerEx("Color1", 500, 0, "d" ,playerid);
}

public OnFilterScriptExit()
{
    return 1;
}
WHAT is this??

This will not work for more than 1 player as the timer is not supported for MAX_PLAYERS it will only run for 1 player.
The script is bugged and why are you using 6 timers?... it can be made easily with SINGLE timer here i fixed it up for you.
pawn Код:
#include <a_samp>
#define COLOR_RED 0xFF0000FF
new CTimer1[MAX_PLAYERS];

forward Color1(playerid);

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Rainbow Skin - by Teddy.edited by Littlehelper[MDZ] ");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rainbowman", cmdtext, true, 14) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, "Rainbow Man has been turned on.");
            CTimer1[playerid] = SetTimerEx("Color1", 500, 0, "d" ,playerid);
        }
    }
    if (strcmp("/rainbowmanoff", cmdtext, false, 14) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, "Rainbow Man has been turned off.");
            KillTimer(CTimer1[playerid]);
            TogglePlayerControllable(playerid, 1);
        }
    }
}

public Color1(playerid)
{
   new skins = random(5);
   switch(skins) {
    case 0:
   SetPlayerSkin(playerid, 19);
    case 1:
   SetPlayerSkin(playerid, 22);
    case 2:
   SetPlayerSkin(playerid, 84);
    case 3:
   SetPlayerSkin(playerid, 115);
    case 4:
   SetPlayerSkin(playerid, 293);
   }
}
Reply
#3

I tried before
and works perfectly as it is
Reply
#4

where is the rainbow or something simmilar to it?
itnt it just a skin changer
still new idea thats good
Reply
#5

Faster and simpler, also not a new idea!

pawn Код:
include <a_samp>

new TimerOn[MAX_PLAYERS],Timer[MAX_PLAYERS];

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rainbowman", cmdtext, true, 14) == 0)
    {
        if(TimerOn[playerid]==0)
        {
            SendClientMessage(playerid,-1, "Rainbow Man has been turned on.");
            Timer[playerid] = SetTimerEx("Skin", 1000, 0, "d" ,playerid);
            TimerOn[playerid]=1;
        }
        else
        {
            SendClientMessage(playerid,-1, "Rainbow Man has been turned off.");
            KillTimer(Timer[playerid]);
            TimerOn[playerid]=0;
        }
    }
    return 0;
}

forward Skin(playerid);
public Skin(playerid)
{
    SetPlayerSkin(playerid,random(299));
    TogglePlayerControllable(playerid,1); //Otherwise it will freeze and bug you!
    return 1;
}
You have to much useless Code in this Script. Starting many Timers != great for server performance. Also is Littlehelper[MDZ] correct. It would work only for one person.
Reply
#6

Quote:
Originally Posted by sirvasy
Посмотреть сообщение
I tried before
and works perfectly as it is
It ONLY works for SINGLE person not for more let me ask you something, did you even tested this with more than 1 player in the server? also it is very inefficient i won't suggest using this script unless modified.
Reply
#7

Lool, it seems funny anyways i'd give 8/10..
Reply
#8

pawn Код:
//================ Rainbow Man ==========
//======= By Teddy ============
#include <a_samp>
#define COLOR_RED 0xFF0000FF
new CTimer1;
new CTimer2;
new CTimer3;
new CTimer4;
new CTimer5;
forward Color1(playerid);
forward Color2(playerid);
forward Color3(playerid);
forward Color4(playerid);
forward Color5(playerid);

public OnFilterScriptInit()
{
    print("\n--------------------------------------");
    print(" Rainbow Skin - by Teddy.        ");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rainbowman", cmdtext, true, 14) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, "Rainbow Man has been turned on.");
            KillTimer(CTimer2);
            KillTimer(CTimer3);
            KillTimer(CTimer4);
            KillTimer(CTimer5);
            CTimer1 = SetTimerEx("Color1", 500, 0, "d" ,playerid);
        }
    }
    if (strcmp("/rainbowmanoff", cmdtext, false, 14) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, "Rainbow Man has been turned off.");
            KillTimer(CTimer1);
            KillTimer(CTimer2);
            KillTimer(CTimer3);
            KillTimer(CTimer4);
            KillTimer(CTimer5);
            TogglePlayerControllable(playerid, 1);
        }
    }
}

public Color1(playerid)
{
   KillTimer(CTimer1);
   SetPlayerSkin(playerid, 19);
   CTimer2 = SetTimerEx("Color2", 500, 0, "d" ,playerid);
}

public Color2(playerid)
{
   KillTimer(CTimer2);
   SetPlayerSkin(playerid, 22);
   CTimer3 = SetTimerEx("Color3", 500, 0, "d" ,playerid);
}

public Color3(playerid)
{
   KillTimer(CTimer3);
   SetPlayerSkin(playerid, 84);
   CTimer4 = SetTimerEx("Color4", 500, 0, "d", playerid);
}

public Color4(playerid)
{
   KillTimer(CTimer4);
   SetPlayerSkin(playerid, 115);
   CTimer5 = SetTimerEx("Color5", 500, 0, "d" ,playerid);
}

public Color5(playerid)
{
   KillTimer(CTimer5);
   SetPlayerSkin(playerid, 293);
   SetTimerEx("Color1", 500, 0, "d" ,playerid);
}

public OnFilterScriptExit()
{
    return 1;
}
pawn Код:
#include <a_samp>


#define COLOR_RED 0xFF0000FF
new CTimer1;
new CTimer2;
new CTimer3;
new CTimer4;
new CTimer5;
forward Color1(playerid);
forward Color2(playerid);
forward Color3(playerid);
forward Color4(playerid);
forward Color5(playerid);

public OnFilterScriptInit()
{a
    print("\n--------------------------------------");
    print(" Rainbow Cars - by v0nz.     ");
    print("--------------------------------------\n");
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/rainbowcar", cmdtext, true, 14) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, "Rainbow Car has been turned on.");
            KillTimer(CTimer2);
            KillTimer(CTimer3);
            KillTimer(CTimer4);
            KillTimer(CTimer5);
            CTimer1 = SetTimerEx("Color1", 500, 0, "d" ,playerid);
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle.");
        }
    }
    if (strcmp("/rainbowcaroff", cmdtext, false, 14) == 0)
    {
        if(IsPlayerInAnyVehicle(playerid))
        {
            SendClientMessage(playerid, COLOR_RED, "Rainbow Car has been turned off.");
            KillTimer(CTimer1);
            KillTimer(CTimer2);
            KillTimer(CTimer3);
            KillTimer(CTimer4);
            KillTimer(CTimer5);
        }
        else
        {
            SendClientMessage(playerid, COLOR_RED, "You are not in a vehicle.");
        }
    }
}

public Color1(playerid)
{
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer1);
   ChangeVehicleColor(vehicleid, 1, 1);
   CTimer2 = SetTimerEx("Color2", 500, 0, "d" ,playerid);
}

public Color2(playerid)
{
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer2);
   ChangeVehicleColor(vehicleid, 2, 2);
   CTimer3 = SetTimerEx("Color3", 500, 0, "d" ,playerid);
}

public Color3(playerid)
{
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer3);
   ChangeVehicleColor(vehicleid, 3, 3);
   CTimer4 = SetTimerEx("Color4", 500, 0, "d", playerid);
}

public Color4(playerid)
{
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer4);
   ChangeVehicleColor(vehicleid, 4, 4);
   CTimer5 = SetTimerEx("Color5", 500, 0, "d" ,playerid);
}

public Color5(playerid)
{
   new vehicleid = GetPlayerVehicleID(playerid);
   KillTimer(CTimer5);
   ChangeVehicleColor(vehicleid, 5, 5);
   SetTimerEx("Color1", 500, 0, "d" ,playerid);
}

public OnFilterScriptExit()
{
    return 1;
}
Are credits hard to type?
Your fingers must hurt from all that typing when you only edit a few things.
Reply
#9

nice !
Reply
#10

tnx is olny for funn
or to make a choice for skin
for this need have added time and skins, simple mod
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)