[FilterScript] Raimbow Man [Skin change with time]
#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


Messages In This Thread
Raimbow Man [Skin change with time] - by sirvasy - 25.05.2013, 16:47
Re: Raimbow Man [Skin change with time] - by Littlehelper - 25.05.2013, 16:55
Re: Raimbow Man [Skin change with time] - by sirvasy - 25.05.2013, 17:00
Re: Raimbow Man [Skin change with time] - by Abhishek. - 25.05.2013, 17:02
AW: Raimbow Man [Skin change with time] - by ulbi1990 - 25.05.2013, 17:34
Re: Raimbow Man [Skin change with time] - by Littlehelper - 25.05.2013, 18:59
Re: Raimbow Man [Skin change with time] - by BpVanshVk - 25.05.2013, 22:19
Re: Raimbow Man [Skin change with time] - by Deron_Green - 26.05.2013, 20:04
Re: Raimbow Man [Skin change with time] - by Alex Magaсa - 26.05.2013, 20:12
Re: Raimbow Man [Skin change with time] - by sirvasy - 28.05.2013, 20:15

Forum Jump:


Users browsing this thread: 3 Guest(s)