Hallo Community, ich habe mal den gamemode mafia vs police für lan private lan party geändert, nun wollte ich ein cuff system einfügen
if(strcmp(cmd, "/cuff", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == TEAM_POLICE || IsInAdmin[playerid] == 1)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, dblau, "Verwendung: /cuff [spielerid/teildesnamens]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if(gTeam[giveplayerid] == 2 || IsACop(giveplayerid))
{
SendClientMessage(playerid, dblau, "Du kannst einen Polizisten keine Handschellen anlegen!");
return 1;
}
if(PlayerCuffed[giveplayerid] > 0)
{
SendClientMessage(playerid, dblau, "Dieser Spieler trägt bereits Handschellen!");
return 1;
}
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
new car = GetPlayerVehicleID(playerid);
if(giveplayerid == playerid) { SendClientMessage(playerid, dblau, "Du kannst dir nicht selbst Handschellen anlegen!"); return 1; }
if(IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == 2 && IsPlayerInVehicle(giveplayerid, car))
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Dir wurden von %s Handschellen angelegt.", sendername);
SendClientMessage(giveplayerid, dblau, string);
format(string, sizeof(string), "* Du hast %s Handschellen angelegt.", giveplayer);
SendClientMessage(playerid, dblau, string);
format(string, sizeof(string), "* %s hat %s Handschellen angelegt.", sendername ,giveplayer);
ProxDetector(30.0, playerid, string, dblau);
GameTextForPlayer(giveplayerid, "~r~Handschellen angelegt", 2500, 3);
TogglePlayerControllable(giveplayerid, 0);
PlayerCuffed[giveplayerid] = 2;
PlayerCuffedTime[giveplayerid] = 180;
}
else
{
SendClientMessage(playerid, dblau, "Dieser Spieler ist nicht in deinem Fahrzeug oder du bist nicht Fahrer!");
return 1;
}
}
else
{
SendClientMessage(playerid, dblau, "Dieser Spieler ist zu weit entfernt!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, dblau, "Diesen Spieler gibt es nicht!");
return 1;
}
}
else
{
SendClientMessage(playerid, dblau, " You are not a Cop / FBI / National Guard !");
}
}
return 1;
}
if(strcmp(cmd, "/uncuff", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gTeam[playerid] == 2)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) {
SendClientMessage(playerid, dblau, "Verwendung: /uncuff [spielerid/teildesnamens]");
return 1;
}
giveplayerid = ReturnUser(tmp);
if(IsPlayerConnected(giveplayerid))
{
if(giveplayerid != INVALID_PLAYER_ID)
{
if (ProxDetectorS(8.0, playerid, giveplayerid))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, dblau, "You cannot Uncuff yourself!"); return 1; }
if(PlayerCuffed[giveplayerid])
{
GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* Dir wurden die Handschellen von %s abgenommen.", sendername);
SendClientMessage(giveplayerid, dblau, string);
format(string, sizeof(string), "* Du hast %s's Handschellen entfernt.", giveplayer);
SendClientMessage(playerid, dblau, string);
GameTextForPlayer(giveplayerid, "~g~Handschellen sind ab", 2500, 3);
TogglePlayerControllable(giveplayerid, 1);
PlayerCuffed[giveplayerid] = 0;
}
else
{
SendClientMessage(playerid, dblau, "Dieser Spieler trägt keine Handschellen!");
return 1;
}
}
else
{
SendClientMessage(playerid, dblau, "Dieser Spieler ist zu weit entfernt!");
return 1;
}
}
}
else
{
SendClientMessage(playerid, dblau, "Diesen Spieler gibt es nicht!");
return 1;
}
}
else
{
SendClientMessage(playerid, dblau, " Du bist kein Polizist / FBI Agent / Nationalgarde!");
}
}//not connected
return 1;
}
Das ist dabei ruasgekommen, nun zeigt er folgende Feheler an wenn ich konventiere
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(762) : error 017: undefined symbol "cmd"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(768) : error 017: undefined symbol "tmp"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(768) : error 017: undefined symbol "strtok"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(769) : error 017: undefined symbol "tmp"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(773) : error 017: undefined symbol "giveplayerid"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(773) : error 017: undefined symbol "ReturnUser"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(774) : error 017: undefined symbol "giveplayerid"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(776) : error 017: undefined symbol "giveplayerid"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(778) : error 017: undefined symbol "giveplayerid"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(781) : warning 217: loose indentation
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(783) : error 017: undefined symbol "PlayerCuffed"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(783) : error 017: undefined symbol "giveplayerid"
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(783) : error 029: invalid expression, assumed zero
C:\GTA San Andreas\gamemodes\Mafia-Policev4 - Kopie (2) - Kopie.pwn(783) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
Kann mir einer helfen?
mfg