24.04.2012, 17:44
There were lot of loose braces in your code and even loose indentation.
Try this one:
Try this one:
pawn Код:
if(newstate == PLAYER_STATE_DRIVER)
{
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"Trebuie sa fiti la volan.");
if(GetPVarInt(playerid,"used") == 0)
{
new car = GetPlayerVehicleID(playerid);
obj[playerid] = CreatePlayerObject(playerid,19300, 0.0000, -1282.9984, 10.1493, 0.0000, -1, -1, 100);
AttachPlayerObjectToVehicle(playerid,obj[playerid],car,-0.314999, -0.195000, 0.510000, 0.000000, 0.000000, 0.000000);
AttachCameraToPlayerObject(playerid,obj[playerid]);
SetPVarInt(playerid,"used",1);
}
else if(GetPVarInt(playerid,"used") == 1)
{
SetCameraBehindPlayer(playerid);
DestroyPlayerObject(playerid,obj[playerid]);
SetPVarInt(playerid,"used",0);
}
return 1;
}