02.06.2012, 10:31
Hello guys.I use 3rd Person Vehicle Driving FS
This is him code
My problem is why everything when i entry in car and i should to write /changeview .. How can i delete this command and everything when i entry in vehicle .. automatic to change me in 3d person. Sorry for my english
This is him code
Код:
//=========================== 1st Person Vehicle Driving By rati555 || V0.2 ===========================// #include <a_samp> #include <zcmd> #define FILTERSCRIPT new obj[MAX_PLAYERS]; public OnFilterScriptInit() { print(" 1st Person Vehicle Driving by Rati555"); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerExitVehicle(playerid,vehicleid) { if(GetPVarInt(playerid,"used") == 1) { SetPVarInt(playerid,"used",0); SetCameraBehindPlayer(playerid); DestroyPlayerObject(playerid,obj[playerid]); } return 1; } CMD:changeview(playerid,params[]) { #pragma unused params if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,-1,"You must be in a vehicle to use this cmd"); if(GetPVarInt(playerid,"used") == 0) { new p = GetPlayerVehicleID(playerid); obj[playerid] = CreatePlayerObject(playerid,19300, 0.0000, -1282.9984, 10.1493, 0.0000, -1, -1, 100); AttachPlayerObjectToVehicle(playerid,obj[playerid],p,-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; }