Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- new Plane;
- new Banshee;
- new sometimer;
- public OnFilterScriptInit()
- {
- Plane = CreateObject(-2435,0.0,0.0,0.0,0.0,0.0,0.0,7.0);
- Banshee = CreateVehicle(429,0.0,0.0,0.0,0.0,0,3,-1,0);
- sometimer = SetTimer("fixxedupdate",1000,false);//
- colorplane();
- return 1;
- }
- public OnFilterScriptExit()
- {
- DestroyObject(Plane);
- DestroyVehicle(Banshee);
- KillTimer(sometimer);
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp(cmdtext, "/banshee", true)==0)
- {
- new Float:nabpos[3];
- GetPlayerPos(playerid,nabpos[0],nabpos[1],nabpos[2]);
- SetVehiclePos(Banshee,nabpos[0] + 2.0,nabpos[1] + 2.0,nabpos[2] + 2.0);
- return 1;
- }
- else if (strcmp(cmdtext, "/checkcol", true)==0)
- {
- // IsCameraOK(playerid);
- return 1;
- }
- else if (strcmp(cmdtext, "/planehere", true)==0)
- {
- new Float:mypos[3];
- GetPlayerPos(playerid,mypos[0],mypos[1],mypos[2]);
- SetObjectPos(Plane,mypos[0],mypos[1],mypos[2] -1.0);//my old eyes
- SetObjectRot(Plane,0.0,90.0,0.0);
- return 1;
- }
- return 0;
- }
- ////////////////RotateTheThing////////////////////////////////////////////////////////////////
- forward fixxedupdate();
- public fixxedupdate()
- {
- //for loop about players
- for(new i; i < MAX_PLAYERS; i++)
- {
- // IsCameraOK(i);//its perfect fuck off it will return or it wont ahahahahahhaah xD
- }
- return 1;
- }
- forward colorplane();
- public colorplane()
- {
- SetObjectMaterial(Plane, 0, 10817, "airportgnd_sfse", "black64", 0);
- AttachObjectToVehicle(Plane,Banshee,0.0,0.0,-4.34,0.0,0.0,0.0);//ry 90
- return 1;
- }
- /*
- stock IsCameraOK(playerid)//my life is just another obj
- {
- new line[128];
- new Float:startRay[3];
- new Float:endRay[3];
- new Float:colisionPos[3];//yep this is colision position , see
- GetPlayerCameraPos(playerid,startRay[0],startRay[1],startRay[2]);
- endRay[0] = startRay[0];
- endRay[1] = startRay[1];
- endRay[2] = startRay[2] - 100.0;
- CA_RayCastLineID(startRay[0],startRay[1],startRay[2],endRay[0],endRay[1],endRay[2], colisionPos[0], colisionPos[1], colisionPos[2]);//raycast down
- if(endRay[2] != startRay[2] - 100.0)
- // if(colisionPos[2] == endRay[2] )
- {
- format(line, sizeof(line), "myendRay[0] = %f ,endRay[1] = %f ,endRay[2] = %f ", endRay[0],endRay[1],endRay[2]);
- SendClientMessage(playerid,0xFF0066FF,line);
- SendClientMessage(playerid,0x66CC99FF,"your ok..");
- return 1;
- }
- else
- {
- format(line, sizeof(line), "myendRay[0] = %f ,endRay[1] = %f ,endRay[2] = %f ", endRay[0],endRay[1],endRay[2]);
- SendClientMessage(playerid,0xFF0066FF,line);
- SendClientMessage(playerid,0x66CC99FF,"BLIND THIS MAN");
- }
- return 0;//false
- }
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement