Jo, sowohl nach der Befehl eingabe als auch wenn ich in der Console gmx eingebe
Beiträge von Lιση
-
-
Ja aber wie mach ich es nun das er nicht immer die Console schließt, benutze übrigends MySQL falls das wichtig ist.
-
Das geht ihrgendwie nicht
-
Wie kann ich das ändern, aber trozdem meinen Countdown behalten?
-
Ja, bin noch Anfänger, ist das schlümm?
-
Hallo liebe User,
ich habe einen GMX Command gmacht und bei dem schließt sich die Console immer.Command:
if (strcmp(cmdtext,"/gmx",true)==0)
{
if(!isAdmin(playerid,5))return SendClientMessage(playerid,Rot,"Du hast nicht das nötige Adminlevel dafür!");
SendClientMessageToAll(Rot,"SERVERNACHRICHT: Der Server wird in 30 Sekunden neugestartet!");
savePlayer(playerid);
SetTimer("GMX30",1000,0);
}
public GMX30()
{
GameTextForAll("GMX: 30",1000,4);
SetTimer("GMX29",1000,0);
return 1;
}
public GMX29()
{
GameTextForAll("GMX: 29",1000,4);
SetTimer("GMX28",1000,0);
return 1;
}
public GMX28()
{
GameTextForAll("GMX: 28",1000,4);
SetTimer("GMX27",1000,0);
return 1;
}
public GMX27()
{
GameTextForAll("GMX: 27",1000,4);
SetTimer("GMX26",1000,0);
return 1;
}
public GMX26()
{
GameTextForAll("GMX: 26",1000,4);
SetTimer("GMX25",1000,0);
return 1;
}
public GMX25()
{
GameTextForAll("GMX: 25",1000,4);
SetTimer("GMX24",1000,0);
return 1;
}
public GMX24()
{
GameTextForAll("GMX: 24",1000,4);
SetTimer("GMX23",1000,0);
return 1;
}
public GMX23()
{
GameTextForAll("GMX: 23",1000,4);
SetTimer("GMX22",1000,0);
return 1;
}
public GMX22()
{
GameTextForAll("GMX: 22",1000,4);
SetTimer("GMX21",1000,0);
return 1;
}
public GMX21()
{
GameTextForAll("GMX: 21",1000,4);
SetTimer("GMX20",1000,0);
return 1;
}
public GMX20()
{
GameTextForAll("GMX: 20",1000,4);
SetTimer("GMX19",1000,0);
return 1;
}
public GMX19()
{
GameTextForAll("GMX: 19",1000,4);
SetTimer("GMX18",1000,0);
return 1;
}
public GMX18()
{
GameTextForAll("GMX: 18",1000,4);
SetTimer("GMX17",1000,0);
return 1;
}
public GMX17()
{
GameTextForAll("GMX: 17",1000,4);
SetTimer("GMX16",1000,0);
return 1;
}
public GMX16()
{
GameTextForAll("GMX: 16",1000,4);
SetTimer("GMX15",1000,0);
for(new i; i<MAX_PLAYERS; i++)
{
InterpolateCameraPos(i,1372.8593,-931.0602,66.3161, 1176.8585,-960.1643,58.2323, 45000, CAMERA_MOVE);
InterpolateCameraLookAt(i,1278.8064,-926.8247,49.4459, 1197.3507,-919.9426,46.6816, 45000,CAMERA_MOVE);
return 1;
}
return 1;
}
public GMX15()
{
GameTextForAll("GMX: 15",1000,4);
SetTimer("GMX14",1000,0);
return 1;
}
public GMX14()
{
GameTextForAll("GMX: 14",1000,4);
SetTimer("GMX13",1000,0);
return 1;
}
public GMX13()
{
GameTextForAll("GMX: 13",1000,4);
SetTimer("GMX12",1000,0);
return 1;
}
public GMX12()
{
GameTextForAll("GMX: 12",1000,4);
SetTimer("GMX11",1000,0);
return 1;
}
public GMX11()
{
GameTextForAll("GMX: 11",1000,4);
SetTimer("GMX10",1000,0);
return 1;
}
public GMX10()
{
GameTextForAll("GMX: 10",1000,4);
SetTimer("GMX9",1000,0);
return 1;
}
public GMX9()
{
GameTextForAll("GMX: 9",1000,4);
SetTimer("GMX8",1000,0);
return 1;
}
public GMX8()
{
GameTextForAll("GMX: 8",1000,4);
SetTimer("GMX7",1000,0);
return 1;
}
public GMX7()
{
GameTextForAll("GMX: 7",1000,4);
SetTimer("GMX6",1000,0);
return 1;
}
public GMX6()
{
GameTextForAll("GMX: 6",1000,4);
SetTimer("GMX5",1000,0);
return 1;
}
public GMX5()
{
GameTextForAll("GMX: 5",1000,4);
SetTimer("GMX4",1000,0);
return 1;
}
public GMX4()
{
GameTextForAll("GMX: 4",1000,4);
SetTimer("GMX3",1000,0);
return 1;
}
public GMX3()
{
GameTextForAll("GMX: 3",1000,4);
SetTimer("GMX2",1000,0);
return 1;
}
public GMX2()
{
GameTextForAll("GMX: 2",1000,4);
SetTimer("GMX1",1000,0);
return 1;
}
public GMX1()
{
GameTextForAll("GMX: 1",1000,4);
SetTimer("GMXKICK",1000,0);
return 1;
}
public GMXKICK()
{
SendRconCommand("gmx");
return 1;
} -
Ja habe die Datei eingefügt, dann bekomme ich eine Meldung dass sie Fehlerhaft wäre
-
Hallo liebe User,
ich habe das Problem das ich immer eine Fehlermeldung bekomme das die msvcr100.dll Datei fehlt. Nun habe ich gelesen das ich http://www.microsoft.com/de-de…confirmation.aspx?id=5555 installieren muss und er macht es aber nicht weil ich eine neuere Version hab, und nun wolte ich fragen wenn ich die neue runter werfe geht dann vlt. eins meiner Spiele nicht mehr? Das muss ja ein Spiel drauf gemacht haben, weil ich habs nicht drauf gemacht.
Mit freundlichen Grüßen,
Dexter -
Hallo Community, ich habe ein Problem und zwar habe ich zb in das Pollizei Haus Türen gemappt. Und alles hat perfekt geklappt die gingen auf und zu. Nun ist aber komischer weise gar keine Tür mehr da.
Aber wenn ich nicht in der Fraktion bin, dann kommt aber eine Fehlermeldung, also geht ja alles nur sie sind ebend ihrgendwie verschwunden
Mit freundlichen Grüßen,
Dexter -
Ja aber dann fliegt er doch bei der Skinauswahl rum oder?
-
Hallo Community, also ich habe mit InterPolateCameraPos und LookAt so einen Login Hintergrund gemacht. Das Problem ist aber das er den nur nach einem neustart(gmx) anzeigt, wenn sich jemand einloggt gerade dann nicht. Hab es bei OnPlayerConnect eingefügt! Ich hoffe ihr könnt mir helfen...
Mit freundlichen Grüßen,
Dexter -
Nee, hatte nur einen Waffenladen gemacht.
EDIT: Gehen die?
stock LoadWeapon(playerid)
{
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.",name);
GivePlayerWeapon(playerid, GetPVarInt(playerid,"Wslot1"), GetPVarInt(playerid,"Mslot1"));
return 1;
}stock SaveWeapon(playerid)
{
new waffe, ammo;
new Spielerdatei[64];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(Spielerdatei,sizeof(Spielerdatei),"/Accounts/%s.",name);
GetPlayerWeaponData(playerid,2,waffe,ammo);
dini_IntSet(Spielerdatei,"Wslot1",waffe);
dini_IntSet(Spielerdatei,"Mslot1",ammo);
return 1;
} -
Ich kapiers einfach nicht
-
Also muss ich einfach nur GetPlayerWeaponData bei kill und disconnect hinzufügen und GivePlayerWeapon bei spawn oder wie?
P.S: Benutze dini
-
Hallo Community, ich bin noch ein Anfänger und hab keine Ahnung wie man die Waffen nach dem Tot oder dem Login wieder hat, also sie speichern und wiedergeben. Ich habe auch das eine Filterscript ausprobiert (lo_waffenspeichern (oder so)). Ich hoffe ihr könnt mir helfen
Mit freundlichen Grüßen,
Dexter -
Hallo, ich habe ein Problem und zwar hab ich so einen Essenskauf gemacht für den BSN und dort habe ich das Problem. Wenn der erste essen kauft geht alles, kommt ein zweiter und kauft sich was wird der erst gefrezzt und es kommt ihr essen wird zubereitet aber dann kriegt der der als erstet gekauft hat das leben und der der als zweites gekauft hat bleibt gefrezzt.
if (strcmp("/fastfood", cmdtext, true, 10) == 0)
{
if (IsPlayerInRangeOfPoint(playerid, 3, 377.5249,-68.1650,1001.5151))
{
TogglePlayerControllable(playerid,0);
SendClientMessage(playerid,Blau,"Einen moment, ihr Essen wird zubereitet...");
SetTimer("bsnessen", 5000, false);
}
else
SendClientMessage(playerid,Rot,"Du bist nicht im BSN an der Theke!");
}public bsnessen(playerid)
{
SetPlayerHealth(playerid,100);
SendClientMessage(playerid,Rot,"Ihr Leben wurde nun wieder aufgefüllt.");
TogglePlayerControllable(playerid,1);
return 1;
}Mit freundlichen Grüßen,
Dexter -
Ja aber das Problem ist ja ich finde nicht im dem Filterscript wo der Key davon is
-
Hallo, liebe Community.
Ich habe ein Problem und zwar habe ich dieses Filterscript für meinen Server und bei dem kann man mit der Taste STRG den Motor an amchen, nun möchte ich das aber ändern und weiß aber nicht wo dieser key difiniert ist.
Thread closed!
Mit freundlichen Grüßen,
DexterA1 -
Das Filterscript:
/**
* (C) Karagon 2012
* Use With Permission.
* Leave author credits.
*
* Licenses:
* This work is licensed under the Creative
* Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.
* To view a copy of this license,
* visit http://creativecommons.org/licenses/by-nc-nd/3.0/
* or send a letter to
* Creative Commons,
* 444 Castro Street,
* Suite 900, Mountain View,
* California, 94041, USA.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHORS ''AS IS'' AND ANY EXPRESS
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
* BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <a_samp>//Now, redefine MAX_PLAYERS for what you need:
#undef MAX_PLAYERS
#define MAX_PLAYERS 200 //Right now, it's for 200. If your server needs more, just put the number there.// Variables for the Text Draw.
//It's done in 4 text draws to make it easier to modify.
new Text:speedo1[MAX_PLAYERS];
new Text:speedo2[MAX_PLAYERS];
new Text:speedo3[MAX_PLAYERS];
new Text:speedo4[MAX_PLAYERS];//Variables for the distance counter
new CarFuel[MAX_VEHICLES]; //Holds the fuel for each vehicle.
new Float:PlayerPos[3][MAX_PLAYERS]; //Holds the player's last posistion.
new PlayerTotalDistance[MAX_PLAYERS]; //Total player distance for each section they drive. (To reduce the fuel)
//For messaging:
new GotFuelMessage[MAX_PLAYERS];//This is stuff that you can change.
#define DEF_GAS (100) //Default gas level for the vehicles in the server when the filterscript is loaded. (DEFAULT: 100)
#define DISTANCE (250) //Distance in which FUEL_INCREMENT will be removed from the fuel (DEFAULT: 250)
#define FUEL_INCREMENT (1) //The value that will be removed from the fuel when DISTANCE is met. (DEFAULT: 1)
#define TEXT_DRAW_FONT (2) //Font for the text draw. It's recomended that you not change this. (DEFAULT: 2)
#define TEXT_DRAW_X_FACTOR (0.4) // Font size X factor (DEFAULT: 0.4) (RECOMENDED NOT TO CHANGE)
#define TEXT_DRAW_Y_FACTOR (0.8) // Font size Y factor (DEFAULT: 0.8) (RECOMENDED NOT TO CHANGE)
#define EXIT_VEHICLE_ON_NO_GAS (true) // If the player should exit the vehicle when the fuel is 0, set this true.
#define WARNING (20) // Number at which to send a warning to the player. (DEFAULT: 20)
#define WARNING_LIMIT (10000) // Time to wait before sending another message about low fuel. (DEFAULT: 10000)//Do not change anything past this point unless you are sure of what you are doing.
//Also, by doing this, you certify that you do not need help from Karagon.
//As he will not help you past this point.
#define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1//The following array is a list of vehicle names.
new CarName[][] =
{
"Landstalker", "Bravura", "Buffalo", "Linerunner", "Perrenial", "Sentinel",
"Dumper", "Firetruck", "Trashmaster", "Stretch", "Manana", "Infernus",
"Voodoo", "Pony", "Mule", "Cheetah", "Ambulance", "Leviathan", "Moonbeam",
"Esperanto", "Taxi", "Washington", "Bobcat", "Whoopee", "BF Injection",
"Hunter", "Premier", "Enforcer", "Securicar", "Banshee", "Predator", "Bus",
"Rhino", "Barracks", "Hotknife", "Trailer", "Previon", "Coach", "Cabbie",
"Stallion", "Rumpo", "RC Bandit", "Romero", "Packer", "Monster", "Admiral",
"Squalo", "Seasparrow", "Pizzaboy", "Tram", "Trailer", "Turismo", "Speeder",
"Reefer", "Tropic", "Flatbed", "Yankee", "Caddy", "Solair", "Berkley's RC Van",
"Skimmer", "PCJ-600", "Faggio", "Freeway", "RC Baron", "RC Raider", "Glendale",
"Oceanic","Sanchez", "Sparrow", "Patriot", "Quad", "Coastguard", "Dinghy",
"Hermes", "Sabre", "Rustler", "ZR-350", "Walton", "Regina", "Comet", "BMX",
"Burrito", "Camper", "Marquis", "Baggage", "Dozer", "Maverick", "News Chopper",
"Rancher", "FBI Rancher", "Virgo", "Greenwood", "Jetmax", "Hotring", "Sandking",
"Blista Compact", "Police Maverick", "Boxvillde", "Benson", "Mesa", "RC Goblin",
"Hotring Racer A", "Hotring Racer B", "Bloodring Banger", "Rancher", "Super GT",
"Elegant", "Journey", "Bike", "Mountain Bike", "Beagle", "Cropduster", "Stunt",
"Tanker", "Roadtrain", "Nebula", "Majestic", "Buccaneer", "Shamal", "Hydra",
"FCR-900", "NRG-500", "HPV1000", "Cement Truck", "Tow Truck", "Fortune",
"Cadrona", "FBI Truck", "Willard", "Forklift", "Tractor", "Combine", "Feltzer",
"Remington", "Slamvan", "Blade", "Freight", "Streak", "Vortex", "Vincent",
"Bullet", "Clover", "Sadler", "Firetruck", "Hustler", "Intruder", "Primo",
"Cargobob", "Tampa", "Sunrise", "Merit", "Utility", "Nevada", "Yosemite",
"Windsor", "Monster", "Monster", "Uranus", "Jester", "Sultan", "Stratium",
"Elegy", "Raindance", "RC Tiger", "Flash", "Tahoma", "Savanna", "Bandito",
"Freight Flat", "Streak Carriage", "Kart", "Mower", "Dune", "Sweeper",
"Broadway", "Tornado", "AT-400", "DFT-30", "Huntley", "Stafford", "BF-400",
"News Van", "Tug", "Trailer", "Emperor", "Wayfarer", "Euros", "Hotdog", "Club",
"Freight Box", "Trailer", "Andromada", "Dodo", "RC Cam", "Launch", "Police Car",
"Police Car", "Police Car", "Police Ranger", "Picador", "S.W.A.T", "Alpha",
"Phoenix", "Glendale", "Sadler", "Luggage", "Luggage", "Stairs", "Boxville",
"Tiller", "Utility Trailer"
};public OnFilterScriptInit()
{
print("\n Karagon's Speedometer and Fuel System ");
print("\n Use with Permission, please leave credits.");
print("\n \t---- Loaded ----");
for (new i = 0; i <MAX_VEHICLES; i++) {
//Loop through all the vehicles and set their fuel levels at DEF_GAS
CarFuel[i] = DEF_GAS;
}
for (new i = 0; i < MAX_PLAYERS; i++) {
GotFuelMessage[i] = -1;
}
return 1;
}public OnFilterScriptExit()
{
for ( new i = 0; i < MAX_PLAYERS; i++) {
//Hide all the text draws for the players
TextDrawHideForPlayer(i, speedo1[i]);
TextDrawHideForPlayer(i, speedo2[i]);
TextDrawHideForPlayer(i, speedo3[i]);
TextDrawHideForPlayer(i, speedo4[i]);
TextDrawDestroy(speedo1[i]);
TextDrawDestroy(speedo2[i]);
TextDrawDestroy(speedo3[i]);
TextDrawDestroy(speedo4[i]);
}
print("\n Karagon's Speedometer and Fuel System");
print("\n Unloading....");
return 1;
}public OnPlayerDeath(playerid, killerid, reason)
{
//Hide all the text draws for the player
TextDrawHideForPlayer(playerid, speedo1[playerid]);
TextDrawHideForPlayer(playerid, speedo2[playerid]);
TextDrawHideForPlayer(playerid, speedo3[playerid]);
return 1;
}// #### Stocks ####
//Do not modify these.//Gets the player's speed in KM/H
//Credits to whom who made it.
stock Float:GetPlayerSpeed(playerid, bool:Z = true) //km.h
{
new Float:SpeedX, Float:SpeedY, Float:SpeedZ;
new Float:Speed;
if(IsPlayerInAnyVehicle(playerid)) GetVehicleVelocity(GetPlayerVehicleID(playerid), SpeedX, SpeedY, SpeedZ);
else GetPlayerVelocity(playerid, SpeedX, SpeedY, SpeedZ);
if(Z) Speed = floatsqroot(floatadd(floatpower(SpeedX, 2.0), floatadd(floatpower(SpeedY, 2.0), floatpower(SpeedZ, 2.0))));
else Speed = floatsqroot(floatadd(floatpower(SpeedX, 2.0), floatpower(SpeedY, 2.0)));
Speed = floatround(Speed * 100 * 1.61);
return Speed;
}//Damage color - Gets the color of the damage percentage.
//Credits to Me
stock DamageColor(Float: h) {
new str[5];
if (h <= 30)
format(str, sizeof(str), "r");
else if (h < 60)
format(str, sizeof(str), "y");
else
format(str, sizeof(str), "g");
return str;
}
//FuelColor - Gets the color of the fuel percentage
//Credits to me
stock FuelColor(vid) {
new str[5];
if (CarFuel[vid] <= 20)
format(str, sizeof(str), "r");
else if (CarFuel[vid] < 40)
format(str, sizeof(str), "y");
else
format(str, sizeof(str), "g");
return str;
}//Use of the distance formula, using 3D space.
//Credits to who made it.
stock GetDistance( Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2 )
{
return floatround( floatsqroot( ( ( x1 - x2 ) * ( x1 - x2 ) ) + ( ( y1 - y2 ) * ( y1 - y2 ) ) + ( ( z1 - z2 ) * ( z1 - z2 ) ) ) ) ;
}// #### Public Functions ####
// Do not edit this stuff unless you know what you're doing.
// I won't help you edit it either.//We'll call OnPlayerUpdate for this. We're only doing this because it's a small amount of code to process
//And shouldn't lag the server. If you have lag issues, you should transfer it to a global loop in the server.
//Preferably, a 1-1.5 second loop. This will give the best result.
public OnPlayerUpdate(playerid) {
if (IsPlayerInAnyVehicle(playerid)) {
new Float:vh, Float:s;
new vid = GetPlayerVehicleID(playerid);
new h, string[80];
GetVehicleHealth(vid, vh);
h = floatround(vh) / 10;
format(string, sizeof(string), "Health: ~%s~%d \%", DamageColor(h), h); //55 -> Orange, 30 -> Red
TextDrawSetString(speedo2[playerid], string);s = GetPlayerSpeed(playerid);
new ss = floatround(s);
format(string, sizeof(string), "Speed: ~g~%d km/h", ss);
TextDrawSetString(speedo3[playerid], string);new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
format(string, sizeof(string), "Gas: ~%s~%d \%", FuelColor(vid), CarFuel[vid]);
TextDrawSetString(speedo4[playerid], string);
new distance = GetDistance(x, y, z, PlayerPos[0][playerid], PlayerPos[1][playerid], PlayerPos[2][playerid]);
PlayerPos[0][playerid] = x;
PlayerPos[1][playerid] = y;
PlayerPos[2][playerid] = z;PlayerTotalDistance[playerid] += distance;
if (PlayerTotalDistance[playerid] > DISTANCE) {
CarFuel[vid] -= FUEL_INCREMENT;
PlayerTotalDistance[playerid] = 0;
}
if (CarFuel[vid] < WARNING) {
if ( (GetTickCount() - GotFuelMessage[playerid]) > WARNING_LIMIT) {
GotFuelMessage[playerid] = GetTickCount();
SendClientMessage(playerid, -1, "Your vehicle has a low amount of fuel. Get a new one, if you have to!");
}
}
if (CarFuel[vid] < 0) {
#if defined EXIT_VEHICLE_ON_NO_GAS
SendClientMessage(playerid, -1, "You have been forced out your vehicle because you have no gas!");
RemovePlayerFromVehicle(playerid);
#endif
}
}
return 1;
}// We will use OnPlayerStateChange to detect if the player is in a vehicle.
// Here, the text draw will be created and placed for the player.
public OnPlayerStateChange(playerid, newstate, oldstate) {
if ( (newstate == PLAYER_STATE_DRIVER || newstate == PLAYER_STATE_PASSENGER) && oldstate == PLAYER_STATE_ONFOOT ) {new str[50];
new vid = GetPlayerVehicleID(playerid);
format(str, sizeof(str), "Vehicle: ~g~%s", CarName[GetVehicleModel(vid)-400]);
speedo1[playerid] = TextDrawCreate(470.0, 390.0, " ");
TextDrawSetString(speedo1[playerid], str);
TextDrawSetShadow(speedo1[playerid], false);
TextDrawSetOutline(speedo1[playerid], 1);
TextDrawLetterSize(speedo1[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
TextDrawSetProportional(speedo1[playerid], 1);
TextDrawFont(speedo1[playerid], TEXT_DRAW_FONT);
TextDrawShowForPlayer(playerid, speedo1[playerid]);new Float:vh;
GetVehicleHealth(vid, vh);
new h = floatround(vh) / 10;
format(str, sizeof(str), "Health: ~g~%d \%", h);
speedo2[playerid] = TextDrawCreate(470.0, 400.0, " ");
TextDrawSetString(speedo2[playerid], str);
TextDrawSetShadow(speedo2[playerid], false);
TextDrawSetOutline(speedo2[playerid], 1);
TextDrawLetterSize(speedo2[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
TextDrawSetProportional(speedo2[playerid], 1);
TextDrawFont(speedo2[playerid], TEXT_DRAW_FONT);
TextDrawShowForPlayer(playerid, speedo2[playerid]);new Float:s = GetPlayerSpeed(playerid);
new ss = floatround(s);
format(str, sizeof(str), "Speed: ~%s~%d km/h", DamageColor(h), ss);
speedo3[playerid] = TextDrawCreate(470.0, 410.0, " ");
TextDrawSetString(speedo3[playerid], str);
TextDrawSetShadow(speedo3[playerid], false);
TextDrawSetOutline(speedo3[playerid], 1);
TextDrawLetterSize(speedo3[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
TextDrawSetProportional(speedo3[playerid], 1);
TextDrawFont(speedo3[playerid], TEXT_DRAW_FONT);
TextDrawShowForPlayer(playerid, speedo3[playerid]);format(str, sizeof(str), "Gas: ~%s~%d \%", FuelColor(vid), CarFuel[vid]);
speedo4[playerid] = TextDrawCreate(470.0, 420.0, " ");
TextDrawSetString(speedo4[playerid], str);
TextDrawSetShadow(speedo4[playerid], false);
TextDrawSetOutline(speedo4[playerid], 1);
TextDrawLetterSize(speedo4[playerid], TEXT_DRAW_X_FACTOR, TEXT_DRAW_Y_FACTOR);
TextDrawSetProportional(speedo4[playerid], 1);
TextDrawFont(speedo4[playerid], TEXT_DRAW_FONT);
TextDrawShowForPlayer(playerid, speedo4[playerid]);new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
PlayerPos[0][playerid] = x;
PlayerPos[1][playerid] = y;
PlayerPos[2][playerid] = z;
}
if (newstate == PLAYER_STATE_ONFOOT && ( oldstate == PLAYER_STATE_DRIVER || oldstate == PLAYER_STATE_ONFOOT ) ) {
TextDrawHideForPlayer(playerid, speedo1[playerid]);
TextDrawHideForPlayer(playerid, speedo2[playerid]);
TextDrawHideForPlayer(playerid, speedo3[playerid]);
TextDrawHideForPlayer(playerid, speedo4[playerid]);
}
return 1;
}//Player command text
//If you wish to use this, DO NOT REMOVE THE FOLLOWING.
public OnPlayerCommandText(playerid, cmdtext[]) {
dcmd(speedocredits, 13, cmdtext);
return 0;
}dcmd_speedocredits(playerid, params[]) {
#pragma unused params
SendClientMessage(playerid, -1, "*Speedometer created by Karagon (c) 2012");
return 1;
}public OnPlayerConnect(playerid) {
GotFuelMessage[playerid] = -1;
return 1;
} -
Hallo liebe Community,
ich habe das Filterscript kSpeedo in meinen Server eingefügt. Aber ich weiß nicht genau wie man einen Command macht das es getankt wird oder überhaupt ein Tanksystem, und wie mach ich das wenn es explodiert das dann der Tank wieder voll ist? Ich hoffe ihr könnt mir helfen.
Mit freundlichen Grüßen,
Dexter