Versuch es so:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(strcmp(cmdtext,"/mv",true) == 0)
{
if(PlayerToPoint(25.0, playerid,3025,-1336.8866,13.3352,235))
{
if(PlayerInfo[playerid][pMember] == 0 || PlayerInfo[playerid][pLeader] == 0)
{
SetTimer("GateClose",3000 , 0);
GetPlayerName(playerid, sendername, sizeof(sendername));
MoveObject(LCNTor,1270.9865722656, -1337.7030029297, 5.112417221069, 2.0);
SendClientMessage(playerid, COLOR_GRAD1,"** Du hast das Tor geöffnet, es schließt sich automatisch wieder!");
}
else SendClientMessage(playerid, COLOR_GRAD1, "** Du bist kein Beamter!");
}
}
if(strcmp(cmdtext, "/motor",true) == 0)
{
if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER) return 1;
new engine,lights,alarm,doors,bonnet,boot,objective;
new vid = GetPlayerVehicleID(playerid);
GetVehicleParamsEx(vid,engine,lights,alarm,doors,bonnet,boot,objective);
if(vid != INVALID_VEHICLE_ID)
{
if(engine == VEHICLE_PARAMS_ON)
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_OFF,lights,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~r~aus!", 2000, 5);
}
else
{
SetVehicleParamsEx(vid,VEHICLE_PARAMS_ON,lights,alarm,doors,bonnet,boot,objective);
GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~W~Motor ~g~an!", 2000, 5);
}
}
return 1;
}
return 1;
}
/Edit: Einrückung verbessert