Hey liebe Breadfish Community ich brauche hilfe bei meinem /drag Befehl ich poste ihn mal
if(strcmp(cmd, "/drag", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 1))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /drag [Playerid/Name]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
{
SendClientMessage(playerid, COLOR_GREY, " Du kannst keine Cops schleifen !");
return 1;
}
if(DragOff[giveplayerid] < 0)
{
SendClientMessage(playerid, COLOR_GREY, " Spieler wird bereits geschliefen!");
return 1;
}
if (ProxDetectorS(3.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich nicht selber schleifen!"); return 1; }
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Du wirst von %s geschliefen, soland bis er dich loslässt.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du schleifst %s, bis du damit aufhörst /stopdrag.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* %s fängt an %s hintersicherherzuschleifen.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
TogglePlayerControllable(giveplayerid, 0);
DragOff[giveplayerid] = playerid;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist nicht in deiner Nähe !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Cop / FBI / National Guard!");
}
}
return 1;
}[/pwn}
[pwn] if(strcmp(cmd, "/stopdrag", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pMember] == 1))
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, COLOR_WHITE, "USAGE: /stopdrag [Playerid/Name]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(3.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "Du kannst dich selber aufhören dich zu schleifen!"); return 1; }
if(DragOff[giveplayerid] > 0)
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s hört auf dich hinterzuschleifen.", sendername);
SendClientMessage(giveplayerid, COLOR_LIGHTBLUE, string);
format(string, sizeof(string), "* Du hast aufgehört %s hinter dir herzuschleifen.", giveplayer);
SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
TogglePlayerControllable(giveplayerid, 1);
DragOff[giveplayerid] = 0;
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler wird nicht geschliefen !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler ist nicht in deiner Nähe !");
return 1;
}
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Der Spieler ist Offline !");
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, " Du bist kein Cop / FBI / National Guard !");
}
}
return 1;
}
Aber da kommen diese Errors
C:\SAMP TEST SERVER\gamemodes\gm.pwn(14939) : error 029: invalid expression, assumed zero
C:\SAMP TEST SERVER\gamemodes\gm.pwn(14956) : error 017: undefined symbol "DragOff"
C:\SAMP TEST SERVER\gamemodes\gm.pwn(14956) : warning 215: expression has no effect
C:\SAMP TEST SERVER\gamemodes\gm.pwn(14956) : error 001: expected token: ";", but found "]"
C:\SAMP TEST SERVER\gamemodes\gm.pwn(14956) : error 029: invalid expression, assumed zero
C:\SAMP TEST SERVER\gamemodes\gm.pwn(14956) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
5 Errors
//Edit Errorcodes wurden hinzugefügt