altes ocmd
ocmd:tie(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid));
{
if(GetPlayerVehicleSeat(playerid)==0);
{
if(isPlayerInFrakt(playerid,GetPVarInt(playerid,"Fraktion")==2| |12;));
{
if(HasPlayerRank(playerid,1));
{
if(sscanf(params,"u",pID,))return SendClientMessage(playerid,gelb,"/tie [playerid]");
TogglePlayerControllable(pID,0);
format(string,sizeof(string),"Du hast %s gefesselt.",SpielerName(pID));
SendClientMessage(playerid,gelb,string);
format(string,sizeof(string),"%s hat dich gefesselt.",SpielerName(playerid));
SendClientMessage(pID,gelb,string);
}
}
}
return 1;
}
}
neues
ocmd:untie(playerid, params[])
{
if(IsPlayerInAnyVehicle(playerid))
{
if(GetPlayerVehicleSeat(playerid)==0)
{
if(isPlayerInFrakt(playerid,GetPVarInt(playerid,"Fraktion") ==2 || isPlayerInFrakt(playerid,GetPVarInt(playerid,"Fraktion") == 12)))
{
if(HasPlayerRank(playerid,1))
{
new pID,string[128];
if(sscanf(params,"u",pID))return SendClientMessage(playerid,gelb,"/untie [playerid]");
TogglePlayerControllable(pID,1);
format(string,sizeof(string),"Du hast %s befreit.",SpielerName(pID));
SendClientMessage(playerid,gelb,string);
format(string,sizeof(string),"%s hat dich befreit.",SpielerName(playerid));
SendClientMessage(pID,gelb,string);
}
}
}
}
return 1;
}
-Semikolon aus der if-abfrage entfernt
-return verschoben
-folgende Zeilen verändert
alt
if(isPlayerInFrakt(playerid,GetPVarInt(playerid,"Fraktion")==2| |12;));
neu
if(isPlayerInFrakt(playerid,GetPVarInt(playerid,"Fraktion") ==2 || isPlayerInFrakt(playerid,GetPVarInt(playerid,"Fraktion") == 12)))
damit die zweite Frak besser erkannt wird