Der Befehl:if(strcmp(cmd, "/tazer", true) ==0)
{
if(IsPlayerConnected(playerid))
{
if(isPlayerInFrakt(playerid,1))
{
if(IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, BLUE, "Du kannst das nicht benutzen während du im Fahrzeug sitzt!");
return 1;
}
}
new suspect = GetClosestPlayer(playerid);
if(IsPlayerConnected(suspect))
{
if(PlayerCuffed[suspect] > 0)
{
SendClientMessage(playerid, BLUE, "Dieser Spieler ist schon getazed!");
return 1;
}
if(GetDistanceBetweenPlayers(playerid,suspect) < 5)
{
if(IsPlayerInAnyVehicle(suspect))
{
SendClientMessage(playerid, BLUE, "Dieser Spieler ist in einem Fahrzeug! Bringe in zuerst raus!");
return 1;
}
GetPlayerName(suspect, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du wurdest von %s mit seinem Elektroschocker für 8 Sekunden geschockt.", sendername);
SendClientMessage(suspect, BLUE, string);
format(string, sizeof(string), "* Du hast %s für 8 Sekunden niedergestreckt.", giveplayer);
SendClientMessage(playerid, BLUE, string);
format(string, sizeof(string), "* %s nimmt seinen Elektroschocker raus und streckt %s nieder.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, BLUE,BLUE,BLUE,BLUE,BLUE);
GameTextForPlayer(suspect, "~r~Geschockt!", 2500, 3);
TogglePlayerControllable(suspect, 0);
PlayerCuffed[suspect] = 1;
PlayerCuffedTime[suspect] = 8;
}
else
{
SendClientMessage(playerid, BLUE, "Niemand ist in deiner Nähe!");
return 1;
}
else
{
SendClientMessage(playerid, BLUE, "Du bist kein Polizist / FBI Agent / Nationalgarde!");
return 1;
}
return 1;
}
Die Erros:
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : error 029: invalid expression, assumed zero
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : warning 215: expression has no effect
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : warning 215: expression has no effect
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : warning 215: expression has no effect
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : warning 215: expression has no effect
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : warning 215: expression has no effect
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : error 001: expected token: ";", but found ")"
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : error 029: invalid expression, assumed zero
C:\Users\WBF Küchen\Desktop\Selfmade\gamemodes\Selfmade.pwn(1301) : fatal error 107: too many error messages on one line
Die Error Zeile:
ShowPlayerDialog(playerid,DIALOG_REGISTER,DIALOG_STYLE_INPUT,"Regstrieren","Gib bitte das gewünschte Passwort ein!","Register","Abbrechen");
}