Er hat 26 Errors, d.h. eine } Klammer vergessen. Überprüf das, was du als letztes bearbeitet hast bzw. greif auf ein Backup zurück. Den Fehler kann man nicht lokalisieren.
mfg
surrender
Er hat 26 Errors, d.h. eine } Klammer vergessen. Überprüf das, was du als letztes bearbeitet hast bzw. greif auf ein Backup zurück. Den Fehler kann man nicht lokalisieren.
mfg
surrender
Funktioniert es nur bei ID 0 oder nur nicht bei ID 0 oder gar nicht?
Hatte leider niemanden zum testen, müsste aber gehen. Siehe Anhang.
Versuchs mal so, ungetestet.
new bool:vDriver[MAX_VEHICLES];
new eingestiegen = 0;
public OnPlayerStateChange(playerid, newstate, oldstate)
{
if(newstate == PLAYER_STATE_DRIVER)
{
vDriver[GetPlayerVehicleID(playerid)] = true;
eingestiegen = 1;
}
else if(newstate == PLAYER_STATE_ONFOOT && oldstate == PLAYER_STATE_DRIVER)
{
vDriver[GetPlayerVehicleID(playerid)] = false;
eingestiegen = 0;
}
return 1;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(!ispassenger)
{
if(vDriver[vehicleid] && eingestiegen == 1 )
{
TogglePlayerControllable(playerid, 1); // Vorgang abbrechen
}
}
return 1;
}
So wieder da
@ Realdog:
Hast du schon was mit den Waffenklassen gemacht? Also iwie angefangen?
@ [BoR]mr_FETjou:
Unter
public OnPlayerCommandText(playerid, cmdtext[])
Klar kein Problem
Also mit Bizz kenn ich mich gar nich aus sry.
Für die Waffenschein Klassen müsste ich alles sehen, was damit zusammenhängt.
Bin jetz aber erstmal ne Weile weg^^
Das war grad keine große Leistung war nur Copy & Paste^^
Klar kannst du Fragen stellen wozu sind wir denn sonst da
Hast du schon im Englischen Forum geschaut? Ich glaub ich hab da mal eins gesehen kann mich aber nicht an den Namen errinern.
Danke Kenny^^
@Maddindog: Ist das das NoDM was du hast?
Ist das nicht im GF schon vorhanden? der Befehl heißt glaube ich /agl. Naja hier isser nochmal:
if(strcmp(cmd, "/agl", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if (PlayerInfo[playerid][pAdmin] >= 2)
{
new x_nr[256];
x_nr = strtok(cmdtext, idx);
if(!strlen(x_nr)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl [name] [playerid/PartOfName]");
SendClientMessage(playerid, COLOR_WHITE, "Available names: Driving, Flying, Sailing, Fishing, Weapon.");
return 1;
}
if(strcmp(x_nr,"flying",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl flyinglicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Flying License to %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Flying License.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pFlyLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"sailing",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl sailinglicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Sailing License to %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Sailing License.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pBoatLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"driving",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl Driverslicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Driving License to %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Driving License.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pCarLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline !");
return 1;
}
}
else if(strcmp(x_nr,"fishing",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl fishinglicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Fishing License to %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Fishing License.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pFishLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
else if(strcmp(x_nr,"weapon",true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /agl weaponlicense [playerid/PartOfName]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
GetPlayerName(playerid, sendername, sizeof(sendername));
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
format(string, sizeof(string), "* You've given a Weapon License to %s.",giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Admin %s has given you a Weapon License.",sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
PlayerInfo[giveplayerid][pGunLic] = 1;
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " That player is Offline!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " You are not authorised to use this command!");
return 1;
}
}
return 1;
}
Wenn er nich geht, Fehler posten.
Wenn du die Model ID meinst, die steht im Wiki:
ZitatAlles anzeigen321 - Regular Dildo
322 - White Dildo
323 - Vibrator
324 - Another Vibrator
325 - Flowers
326 - Cane
327 - A box of some kind <--- No Effect
328 - A large box of some kind <--- No Effect
329 - Removed/Non Existent. <--- DO NOT USE
330 - CJ's Phone
331 - Brass Knuckles
332 - Old VC Screwdriver - Removed. <--- DO NOT USE
333 - Golf Club
334 - Police Truncheon/Night Stick
335 - Combat Knife
336 - Baseball Bat
337 - Shovel
338 - Pool Cue
339 - Katana
340 - Skateboard - Removed. <--- DO NOT USE
341 - Chainsaw
342 - Frag Grenade
343 - Tear Gas Grenade
344 - Molotov Cocktail
345 - Vehicle Missile Launcher <--- Use with caution, very crash prone!
346 - Colt 45 Pistol
347 - Silenced Pistol
348 - Desert Eagle
349 - Regular Shotgun
350 - Sawn-Off Shotgun
351 - Combat Shotgun
352 - Micro Uzi
353 - MP5
354 - Hydra Flare
355 - AK47 Assault Rifle
356 - M4 Assault Rifle
357 - Country Rifle?
358 - Sniper Rifle
359 - Rocket Launcher
360 - Heat Seeking Rocket Launcher
361 - Flamethrower
362 - Minigun
363 - Satchel Charges
364 - Detonator <---- Seemingly Useless.
365 - Spray Paint Can
366 - Fire Extinguisher
367 - Camera
368 - Night Vision Goggles
369 - Infra-Red Goggles
370 - Jet pack
371 - Parachute
372 - Tec-9
373 - Armour model used in Ammunition (No Effect)
Klar läuft aufs selbe hinaus, du musst halt entscheiden, welches du lieber magst.
mfg
surrender
Ja viel spaß damit^^
mfg
surrender
//Edit:
Ich weiß nicht obs funktioniert, aber ersetze mal alle
pModel
mit
pChar
Dann hol es aus deinem GM raus und poste es hier^^
Ersetze das mit dem alten:
if(strcmp(cmd, "/setskin", true) == 0)
{
if(IsPlayerConnected(playerid))
{
tmp = strtok(cmdtext, idx);
if(!tmp[0])return SendClientMessage(playerid,COLOR_GREY,"Verwendung: /setskin [SpielerID] [SkinID]");
new sendername[MAX_PLAYERS];
new giveplayer;
giveplayer = ReturnUser(tmp);
tmp = strtok(cmdtext, idx);
new SkinID;
SkinID = strval(tmp);
if(SkinID > 299 || SkinID < 1) { return SendClientMessage(playerid, COLOR_GREY, "Die SkinID darf nicht unter 1 und über 299 liegen!");}
if (PlayerInfo[playerid][pAdmin] >= 5)
{
if(IsPlayerConnected(giveplayer))
{
if(giveplayer != INVALID_PLAYER_ID)
{
PlayerInfo[giveplayer][pModel] = SkinID;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Dein Skin wurde von Administrator %s geändert.", sendername);
SendClientMessage(giveplayer, COLOR_PURPLE, string);
GetPlayerName(giveplayer,sendername, sizeof(sendername));
format(string, sizeof(string), "* Du hast %s SkinID %d gegeben.", giveplayer,SkinID);
SendClientMessage(playerid, COLOR_PURPLE, string);
SetPlayerSkin(giveplayer, PlayerInfo[giveplayer][pModel]);
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Dir fehlt das benötigte Adminlevel!");
}
}
return true;
}
Das ist das falsche Unterforum. Ich glaube ich nicht, dass sich da jemand meldet, mach ne richtige Vorstellung im richtigen Unterforum und gib ein paar Informationen.
mfg
surrender