ocmd:gethere(playerid,params[])
{
new pID;
new k = GetPlayerInterior(playerid);
new vehicleid = GetPlayerVehicleID(pID);
if(sscanf(params,"u",pID)){return SendClientMessage (playerid,ROT,"NUTZE: /gethere [ID/Name]");}
if(!isPlayerAnAdmin(playerid,1))return SendClientMessage(playerid,ROT,"Du bist kein Admin.");
if(!IsPlayerConnected(pID)){return SendClientMessage (playerid,ROT,"Niemand ist online mit dieser ID!");}
new string[128],string2[128],aname[MAX_PLAYER_NAME],name[MAX_PLAYER_NAME];
GetPlayerName(pID,name,sizeof(name));
GetPlayerName(playerid,aname,sizeof(aname));
format(string,sizeof(string),"Du wurdest zu %s teleportiert!",SpielerName(playerid));
format(string2,sizeof(string2),"Du hast %s zu dir geportet!",SpielerName(pID));
if(IsPlayerInAnyVehicle(pID))
{
new state=GetPlayerState(pID);
if(state==PLAYER_STATE_DRIVER)
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(pID,x,y,z);
SetPlayerInterior(pID,k);
SetVehiclePos(vehicleid,x,y,z);
PutPlayerInVehicle(pID,vehicleid,0);
}
}
else
{
new Float:x,Float:y,Float:z;
GetPlayerPos(playerid,x,y,z);
SetPlayerPos(pID,x,y,z);
SetPlayerInterior(pID,k);
SendClientMessage(pID,GELB,string);
SendClientMessage(playerid,GRÜN,string2);
}
return 1;
}
C:\Dokumente und Einstellungen\Admin\Eigene Dateien\Downloads\Script.pwn(1534) : error 001: expected token: "-identifier-", but found "state"
C:\Dokumente und Einstellungen\Admin\Eigene Dateien\Downloads\Script.pwn(1535) : error 001: expected token: "-identifier-", but found "=="
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Errors.
Danke für die Hilfe im Vorraus