06.02.2012, 16:00
(
Последний раз редактировалось Littlehelper; 12.07.2012 в 12:25.
Причина: New Version
)
Hello,
I created a simple Wheel Switcher for my administration system and thought about releasing it, I got the idea from Rainbow car FS Created by v0nz So i would like to give him credits for the idea.
What Is It About?
Ans:It Is Wheel Switcher, It Changes Car's Wheel Every 6 Second, I Have Added Only 7 Wheels ATM, But You Can Customize It And Add More to Your Needs.
For What Is It Used?
It Can Be Used For Stunt Or FreeRoam Server.
What Are The Commands?
There Are Only Two Commands, /WheelSwitch And /WheelSwitch Off, Commands Are Explained In The Video Given Below!
PS: Sorry For The Bad Quality.
PSS:It "WAS" My First Release On Samp Forums.
New version 1.1, Removed All Six Timers Now Using Only 1 Timer With Switch Statements For More Efficient Code!
Source:
Old Version, Using Six Timers Very In-Efficient!
Please Leave Credits And Post Your FeedBack!
Thank You.
I created a simple Wheel Switcher for my administration system and thought about releasing it, I got the idea from Rainbow car FS Created by v0nz So i would like to give him credits for the idea.
What Is It About?
Ans:It Is Wheel Switcher, It Changes Car's Wheel Every 6 Second, I Have Added Only 7 Wheels ATM, But You Can Customize It And Add More to Your Needs.
For What Is It Used?
It Can Be Used For Stunt Or FreeRoam Server.
What Are The Commands?
There Are Only Two Commands, /WheelSwitch And /WheelSwitch Off, Commands Are Explained In The Video Given Below!
PS: Sorry For The Bad Quality.
PSS:It "WAS" My First Release On Samp Forums.
New version 1.1, Removed All Six Timers Now Using Only 1 Timer With Switch Statements For More Efficient Code!
Source:
pawn Код:
#define FILTERSCRIPT
#include <a_samp> // Credits To SA-MP Team
#include <zcmd> // Credits To ZeeX
new WTimer1;
forward Wheel1(playerid);
#define COLOR_ORANGE 0xFF9900AA
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("WheelSwitcher FS By Littlehelper[MDZ] Loaded!");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
KillTimer(WTimer1);
return 1;
}
main()
{
print("\n----------------------------------");
print("WheelSwitcher FS By Littlehelper[MDZ] UnLoaded!");
print("----------------------------------\n");
}
public OnPlayerConnect(playerid)
{
SendClientMessageToAll(COLOR_ORANGE,"This Server Uses Wheel Dance FS By Littlehelper[MDZ], (/WheelSwitch)");
return 1;
}
public Wheel1(playerid)
{
new Wheel = random(6);
switch(Wheel)
{
case 0: AddVehicleComponent(GetPlayerVehicleID(playerid), 1073);
case 1: AddVehicleComponent(GetPlayerVehicleID(playerid), 1098);
case 2: AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);
case 3: AddVehicleComponent(GetPlayerVehicleID(playerid), 1077);
case 4: AddVehicleComponent(GetPlayerVehicleID(playerid), 1076);
case 5: AddVehicleComponent(GetPlayerVehicleID(playerid), 1075);
}
}
public OnPlayerSpawn(playerid)
{
SendClientMessage(playerid,COLOR_ORANGE,"Type /WheelSwitch For Some Fun");
return 1;
}
COMMAND:wheelswitch(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_ORANGE, "You Successfully Turned WheelSwitcher On!");
WTimer1 = SetTimerEx("Wheel1", 600, 1, "d" ,playerid);
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "You Must Be Inside A Vehicle To Use This Command!");
}
return 1;
}
COMMAND:wheelswitchoff(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
KillTimer(WTimer1);
SendClientMessage(playerid, COLOR_ORANGE, "You Successfully Turned WheelSwitcher Off!");
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "You Must Be Inside A Vehicle To Use This Command!");
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
SendClientMessage(playerid,COLOR_ORANGE,"This Server Uses Wheel Dance Script By Littlehelper[MDZ], Type /WheelSwitch");
return 1;
}
pawn Код:
/*If You Remove Credits, PedoBear Will Fuck You, While Everyone Else Has To Watch.
So Please Donot Remove Tha Credits, Thankx*/
#define FILTERSCRIPT
#include <a_samp> // Credits To SA-MP Team (:
#include <zcmd> // Credits To Zeex (:
new WTimer1;
new WTimer2;
new WTimer3;
new WTimer4;
new WTimer5;
new WTimer6;
new WTimer7;
forward Wheel1(playerid);
forward Wheel2(playerid);
forward Wheel3(playerid);
forward Wheel4(playerid);
forward Wheel5(playerid);
forward Wheel6(playerid);
forward Wheel7(playerid);
#define COLOR_ORANGE 0xFF9900AA
#if defined FILTERSCRIPT
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("WheelSwitcher FS By Littlehelper[MDZ] Loaded!");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
KillTimer(WTimer1);
KillTimer(WTimer2);
KillTimer(WTimer3);
KillTimer(WTimer4);
KillTimer(WTimer5);
KillTimer(WTimer6);
KillTimer(WTimer7);
return 1;
}
#else
main()
{
print("\n----------------------------------");
print("WheelSwitcher FS By Littlehelper[MDZ] UnLoaded!");
print("----------------------------------\n");
}
#endif
public OnPlayerConnect(playerid)
{
/*If You Remove Credits, PedoBear Will Fuck You, While Everyone Else Has To Watch.
So Please Donot Remove Tha Credits, Thankx*/
SendClientMessageToAll(COLOR_ORANGE,"This Server Uses Wheel Switch FS By Littlehelper[MDZ], (/WheelSwitch)");
return 1;
}
public Wheel1(playerid)
{
KillTimer(WTimer1);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1073);
WTimer2 = SetTimerEx("Wheel2", 600, 0, "d" ,playerid);
}
public Wheel2(playerid)
{
KillTimer(WTimer2);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1098);
WTimer3 = SetTimerEx("Wheel3", 600, 0, "d" ,playerid);
}
public Wheel3(playerid)
{
KillTimer(WTimer3);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1080);
WTimer4 = SetTimerEx("Wheel4", 600, 0, "d", playerid);
}
public Wheel4(playerid)
{
KillTimer(WTimer4);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1077);
WTimer5 = SetTimerEx("Wheel5", 600, 0, "d" ,playerid);
}
public Wheel5(playerid)
{
KillTimer(WTimer5);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1076);
WTimer6 = SetTimerEx("Wheel6", 600, 0, "d" ,playerid);
}
public Wheel6(playerid)
{
KillTimer(WTimer6);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1025);
WTimer7 = SetTimerEx("Wheel7", 600, 0, "d" ,playerid);
}
public Wheel7(playerid)
{
KillTimer(WTimer7);
AddVehicleComponent(GetPlayerVehicleID(playerid), 1075);
SetTimerEx("Wheel1", 600, 0, "d" ,playerid);
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
/*If You Remove Credits, PedoBear Will Fuck You, While Everyone Else Has To Watch.
So Please Donot Remove Tha Credits, Thankx*/
SendClientMessage(playerid,COLOR_ORANGE,"Type /WheelSwitch For Some Fun");
return 1;
}
/*If You Remove Credits, PedoBear Will Fuck You, While Everyone Else Has To Watch.
So Please Donot Remove Tha Credits, Thankx*/
COMMAND:wheelswitch(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_ORANGE, "You Successfully Turned WheelSwitcher On!");
KillTimer(WTimer2);
KillTimer(WTimer3);
KillTimer(WTimer4);
KillTimer(WTimer5);
KillTimer(WTimer6);
KillTimer(WTimer7);
WTimer1 = SetTimerEx("Wheel1", 600, 0, "d" ,playerid);
}
else
{
SendClientMessage(playerid, COLOR_ORANGE, "You Must Be Inside A Vehicle To Use This Command!");
}
return 1;
}
COMMAND:wheelswitchoff(playerid,params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_ORANGE, "You Successfully Turned WheelSwitcher Off!");
KillTimer(WTimer1);
KillTimer(WTimer2);
KillTimer(WTimer3);
KillTimer(WTimer4);
KillTimer(WTimer5);
KillTimer(WTimer6);
KillTimer(WTimer7);
}else{
SendClientMessage(playerid, COLOR_ORANGE, "You Must Be Inside A Vehicle To Use This Command!");
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
/*If You Remove Credits, You Will Die Horribly.
So Please Donot Remove Tha Credits, Thankx*/
SendClientMessage(playerid,COLOR_ORANGE,"This Server Uses Wheel Switch Script By Littlehelper[MDZ], Type /WheelSwitch");
return 1;
}
Thank You.