02.02.2012, 13:22
(
Последний раз редактировалось Aloushi; 26.03.2012 в 09:58.
)
Commands For stunt:
1-Dialog MSGBOX long
2-speedboost (lmp)
3-automatic nitro (LMP)
4-load and save system: /s /l
5-define colors
6-carfix when you press 2
7-fightstyle
8-textdraw
type /commands to see all commands
1-Dialog MSGBOX long
2-speedboost (lmp)
3-automatic nitro (LMP)
4-load and save system: /s /l
5-define colors
6-carfix when you press 2
7-fightstyle
8-textdraw
PHP код:
///////////////////////////////////////////////////////////////
//FAOUR
///////////////////////////////////////////////////////////////
#include <a_samp>
#include <Streamer>
new Text:Textdraw0;
new Text:Textdraw1;
new Text:Textdraw2;
new Text:Textdraw3;
new Text:Textdraw4;
new Text:Textdraw5;
new bool:speeding[MAX_PLAYERS];
new bool:AutoNOS[MAX_PLAYERS];
static Float:posx[MAX_PLAYERS] = 0.0;
static Float:posy[MAX_PLAYERS] = 0.0;
static Float:posz[MAX_PLAYERS] = 0.0;
static Float:zangle[MAX_PLAYERS] = 0.0;
#define PRESSED(%0) \
(((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
#define IsPlayerNotInVehicle(%0) (!IsPlayerInAnyVehicle(%0))
#define COLOR_GREEN 0x33AA33AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x3A47DEFF
#define COLOR_TAN 0xBDB76BAA
#define COLOR_PURPLE 0x800080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_BLACK 0x00000000
#define COLOR_DARKGREY 0x696969FF
#define yellow 0xFFFF00AA
#define l_red 0xFF0000AA
#define l_green 0x33FF33AA
#if defined FILTERSCRIPT
#define COLOR_GREY 0xAFAFAFAA
public OnFilterScriptInit() return print("eBoost By Epsilon --- loaded"),1;
public OnFilterScriptExit() return print("eBoost By Epsilon --- unloaded"),1;
public OnPlayerConnect(playerid) return speeding[playerid] = false;
public OnPlayerSpawn(playerid)
public OnFilterScriptInit()
{
print("\n--------------------------------------");
print(" Faour");
print("--------------------------------------\n");
return 1;
}
public OnFilterScriptExit()
{
return 1;
}
#else
main()
{
print("\n----------------------------------");
print(" Faour");
print("----------------------------------\n");
}
#endif
public OnGameModeInit()
{
// Text Draws
Textdraw0 = TextDrawCreate(500.000000, 1.000000, "Stunt");
TextDrawBackgroundColor(Textdraw0, -1);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw0, 0.419999, 2.300000);
TextDrawColor(Textdraw0, -16776961);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
Textdraw2 = TextDrawCreate(1.000000, 300.00000, "Havefun");
TextDrawBackgroundColor(Textdraw2, -1);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw1, 0.620000, 1.900000);
TextDrawColor(Textdraw2,-16776961);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
Textdraw3 = TextDrawCreate(450.000000, 428.00000, "/teleports");
TextDrawBackgroundColor(Textdraw2, -1);
TextDrawFont(Textdraw3, 1);
TextDrawLetterSize(Textdraw3, 0.620000, 1.900000);
TextDrawColor(Textdraw2,-16776961);
TextDrawSetOutline(Textdraw3, 1);
TextDrawSetProportional(Textdraw3, 1);
Textdraw4 = TextDrawCreate(1.000000, 428.00000, "/commands");
TextDrawBackgroundColor(Textdraw4, -1);
TextDrawFont(Textdraw4, 1);
TextDrawLetterSize(Textdraw4, 0.620000, 1.900000);
TextDrawColor(Textdraw4,-16776961);
TextDrawSetOutline(Textdraw4, 1);
TextDrawSetProportional(Textdraw4, 1);
Textdraw5 = TextDrawCreate(500.000000, 100.000000, "Good Luck");
TextDrawBackgroundColor(Textdraw0, -1);
TextDrawFont(Textdraw0, 1);
TextDrawLetterSize(Textdraw5, 0.419999, 2.300000);
TextDrawColor(Textdraw0, -16776961);
TextDrawSetOutline(Textdraw0, 1);
TextDrawSetProportional(Textdraw0, 1);
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
SetPlayerPos(playerid,2025.0773,-1423.5450,16.9922);
SetPlayerCameraPos(playerid,2016.2635,-1432.2692,13.5458);
SetPlayerCameraLookAt(playerid,2025.0773,-1423.5450,16.9922);
SetPlayerFacingAngle(playerid, 135.4);
return 1;
}
public OnPlayerConnect(playerid)
{
if(AutoNOS[playerid])
{
SendClientMessage(playerid, 0x924161FF, "[ ! ] Automatic nitro activated.");
AutoNOS[playerid] = true;
}
else
{
SendClientMessage(playerid, 0x924161FF, "[ ! ] Automatic nitro activated!");
AutoNOS[playerid] = true;
}
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX,"{FFFFFF} welcome server","{00FFFF}/teleports.\n/commands","Ok","Close");
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
return 1;
}
public OnPlayerSpawn(playerid)
{
TextDrawShowForPlayer(playerid, Textdraw1);
TextDrawShowForPlayer(playerid, Textdraw0);
TextDrawShowForPlayer(playerid, Textdraw2);
TextDrawShowForPlayer(playerid, Textdraw3);
TextDrawShowForPlayer(playerid, Textdraw4);
TextDrawShowForPlayer(playerid, Textdraw5);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 57);
GivePlayerWeapon(playerid, 4, 1);
GameTextForPlayer(playerid,"/help",3500,6);
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
SendDeathMessage(killerid,playerid,reason);
if(killerid != INVALID_PLAYER_ID)GivePlayerMoney(playerid,1000);
if(playerid != INVALID_PLAYER_ID) GivePlayerMoney(playerid,-1000);
SetPlayerScore(killerid,GetPlayerScore(killerid)+1);
SetPlayerScore(playerid,GetPlayerScore(playerid)-1);
return 1;
}
public OnVehicleSpawn(vehicleid)
{
return 1;
}
public OnVehicleDeath(vehicleid, killerid)
{
return 1;
}
public OnPlayerText(playerid, text[])
{
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp(cmdtext, "/teleports", true))
{
new BigString15[1900];
strcat(BigString15, "write massage here \n", 1900);
strcat(BigString15, "write massage here \n",1900);
strcat(BigString15, "write massage here \n", 1900 );
strcat(BigString15, "write massage here \n", 1900 );
strcat(BigString15, "write massage here \n", 1900);
strcat(BigString15, "write massage here \n",1900);
strcat(BigString15, "write massage here \n", 1900 );
strcat(BigString15, "write massage here \n", 1900 );
strcat(BigString15, "write massage here \n", 1900);
strcat(BigString15, "write massage here \n",1900);
strcat(BigString15, "write massage here \n", 1900 );
strcat(BigString15, "write massage here \n", 1900 );
strcat(BigString15, "write massage here \n", 1900);
strcat(BigString15, "write massage here \n",1900);
strcat(BigString15, "write massage here \n", 1900 );
strcat(BigString15, "write massage here \n", 1900 );
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_MSGBOX, "--- Teleports ---", BigString15, "Okey","");
return 1;
}
if(strcmp(cmdtext,"/fightstyle",true)==0)
{
ShowPlayerDialog(playerid, 321, DIALOG_STYLE_MSGBOX, "Fighting Style's","/NORMAL\n/BOXING\n/KUNGFU\n/KNEEHEAD\n/GRABKICK\n/ELBOW", "okey", "Cancel");
return 1;
}
if(strcmp(cmdtext,"/commands",true)==0)
{
ShowPlayerDialog(playerid, 123, DIALOG_STYLE_MSGBOX,"commmands","/Teleports.\n/fightstyle\npress 2 to fix car. \npress H to jump car.\n/speedboost.\n\nLoad and Save: /s /l.\nTime:/night /day.","Ok","Close");
return 1;
}
if(!strcmp(cmdtext, "/me", true, 3)) // By Salsa(Leon)
{
if(cmdtext[3] == 0) {
SendClientMessage(playerid, 0xFF0000FF, "USAGE: /Me (action)");
return 1;
}
new str[128];
GetPlayerName(playerid, str, sizeof(str));
format(str, sizeof(str), "* %s %s", str, cmdtext[4]);
SendClientMessageToAll(0xFFFF00AA, str);
return 1;
}
if (strcmp("/day", cmdtext, true, 6) == 0)
{
SetPlayerTime(playerid,13,0);
return 1;
}
if (strcmp("/night", cmdtext, true, 6) == 0)
{
SetPlayerTime(playerid,0,0);
return 1;
}
if(strcmp(cmdtext, "/s", true) == 0)
{
SendClientMessage(playerid,l_red, "Your current position was saved! To teleport back here type /l!");
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID;
VehicleID = GetPlayerVehicleID(playerid);
GetVehiclePos(VehicleID, posx[playerid], posy[playerid], posz[playerid]);
GetVehicleZAngle(VehicleID, zangle[playerid]);
} else {
GetPlayerPos(playerid, posx[playerid], posy[playerid], posz[playerid]);
GetPlayerFacingAngle(playerid, zangle[playerid]);
}
return 1;
}
if(strcmp(cmdtext, "/l", true) == 0)
{
SendClientMessage(playerid, l_red, "Your saved position was loaded!");
if(IsPlayerInAnyVehicle(playerid))
{
new VehicleID = GetPlayerVehicleID(playerid);
SetVehiclePos(VehicleID, posx[playerid], posy[playerid], posz[playerid]);
SetVehicleZAngle(VehicleID, zangle[playerid]);
}
else
{
SetPlayerPos(playerid, posx[playerid], posy[playerid], posz[playerid]);
SetPlayerFacingAngle(playerid, zangle[playerid]);
}
return 1;
}
if (strcmp("/normal", cmdtext, true, 10) == 0)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_NORMAL);
SendClientMessage(playerid, l_red, "FIGHT STYLE NORMAL");
return 1;
}
if (strcmp("/boxing", cmdtext, true, 10) == 0)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_BOXING);
SendClientMessage(playerid, l_red, "FIGHT STYLE Boxing");
return 1;
}
if (strcmp("/kneehead", cmdtext, true, 10) == 0)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KNEEHEAD);
SendClientMessage(playerid, l_red, "FIGHT STYLE Kneehead");
return 1;
}
if (strcmp("/grabkick", cmdtext, true, 10) == 0)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_GRABKICK);
SendClientMessage(playerid, l_red, "FIGHT STYLE grabkick");
return 1;
}
if (strcmp("/elbow", cmdtext, true, 10) == 0)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_ELBOW);
SendClientMessage(playerid, l_red, "FIGHT STYLE Elbow");
return 1;
}
if (strcmp("/kungfu", cmdtext, true, 10) == 0)
{
SetPlayerFightingStyle (playerid, FIGHT_STYLE_KUNGFU);
SendClientMessage(playerid, l_red, "FIGHT STYLE Kungfu");
return 1;
}
if (!strcmp("/speedboost", cmdtext, true))
{
if(speeding[playerid]) speeding[playerid] = false; else speeding[playerid] = true;
if(speeding[playerid]) return SendClientMessage(playerid,0x33AA33AA,"SpeedBoost Actived!"); else return SendClientMessage(playerid,0x33AA33AA,"SpeedBoost De-Activated!");
}
return 0;
}
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
{
if(PRESSED(KEY_SUBMISSION))
{
new vehicleid = GetPlayerVehicleID(playerid);
if(IsPlayerInVehicle(playerid, vehicleid))
{
SetVehicleHealth(vehicleid,1000.0);
RepairVehicle(GetPlayerVehicleID(playerid));
PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
SendClientMessage(playerid,COLOR_YELLOW,"Vehicle Repaired");
}
}
if(PRESSED(KEY_ACTION))
{
if(IsPlayerNotInVehicle(playerid))
{
SendClientMessage(playerid,COLOR_YELLOW,"Faour: no hack No Cheat im hide");
}
}
if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER && AutoNOS[playerid] && (newkeys & KEY_ACTION || newkeys & KEY_FIRE)) AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
if (newkeys & 2 && GetPlayerState(playerid)-1 && speeding[playerid]) return BoostVeh(GetPlayerVehicleID(playerid)); else if (newkeys & 4 && GetPlayerState(playerid)-1 && speeding[playerid]) JumpVeh(GetPlayerVehicleID(playerid));
return 1;
}
BoostVeh(vid, Float:dis = 0.3)
{
new Float:T[3];
GetVehicleVelocity(vid, T[0], T[1], T[2]);
SetVehicleVelocity(vid, T[0], T[1], floatadd(T[2],dis));
SetVehicleHealth(vid,floatpower(1500.84,16));
return 1;
}
JumpVeh(vid, Float:dis = 0.24)
{
new Float:T[4];
GetVehicleVelocity(vid, T[0], T[1], T[2]);
GetVehicleZAngle(vid, T[3]);
SetVehicleVelocity(vid,floatadd(T[0],floatmul(dis,floatsin(-T[3],degrees))), floatadd(T[1],floatmul(dis,floatcos(-T[3],degrees))), T[2]);
SetVehicleHealth(vid,floatpower(1500.84,16));
return 1;
}
type /commands to see all commands