if(strcmp(cmd, "/grab", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pFaction] != 255 && DynamicFactions[PlayerInfo[playerid][pFaction]][fType] != 1)
{
SendClientMessage(playerid, COLOR_GREY, "[Error:] Falsche Fraktion");
}
if(CopOnDuty[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "[Error:] Du bist nicht im Dienst");
return 1;
}
tmp = strtok(cmdtext, idx);
if(!strlen(tmp))
{
SendClientMessage(playerid, COLOR_WHITE, "[Benutze:] /drag [SpielerId]");
return 1;
}
new newcar = GetPlayerVehicleID(playerid);
new playa;
playa = ReturnUser(tmp);
if(!IsPlayerInAnyVehicle(playerid))
{
SendClientMessage(playerid, COLOR_GREY, "[Error:] Du bist in kein Beamten Fahrzeug");
return 1;
}
if(DynamicCars[newcar][FactionCar] != PlayerInfo[playerid][pFaction])
{
SendClientMessage(playerid, COLOR_GREY, "[Error:] Du bist in kein Beamten Fahrzeug");
return 1;
}
if(IsPlayerConnected(playa))
{
if(playa != INVALID_PLAYER_ID)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playa,x,y,z);
if(PlayerToPoint(8.0, playerid, x, y, z))
{
if(giveplayerid == playerid) { SendClientMessage(playerid, COLOR_GREY, "[Error:] Du kannst dich nicht selber ziehen"); return 1; }
PutPlayerInVehicle(playa,newcar,1);
GetPlayerName(playa, giveplayer, sizeof(giveplayer));
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "%s zieht %s ins auto", sendername ,giveplayer);
ProxDetector(15.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "[Error:] Kein Spieler in der nähe");
}
}
}
}
return 1;
}
wenn ich das mache kommt immer du kannst dich nicht selbst graben!!