Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script 7 open clientside{//Update Spectators position to the server
- int ox,oy,oz;
- int x,y,z;
- ox = ACS_NamedExecuteWithResult("GetConsolePlayerCameraX");
- oy = ACS_NamedExecuteWithResult("GetConsolePlayerCameraY");
- oz = ACS_NamedExecuteWithResult("GetConsolePlayerCameraZ");
- x = ox;
- y = oy;
- z = oz;
- while(true){
- x = ACS_NamedExecuteWithResult("GetConsolePlayerCameraX");
- y = ACS_NamedExecuteWithResult("GetConsolePlayerCameraY");
- z = ACS_NamedExecuteWithResult("GetConsolePlayerCameraZ");
- if(x != ox || y != oy || z != oz){
- ox = x;
- oy = y;
- oz = z;
- RequestScriptPuke(8,consoleplayeRnumber(),x,y);
- RequestScriptPuke(88,consoleplayeRnumber(),z,ACS_NamedExecuteWithResult("GetConsolePlayerCameraAngle"));
- RequestScriptPuke(89,consoleplayeRnumber(),ACS_NamedExecuteWithResult("GetConsolePlayerCameraPitch"),0);
- }
- delay(1);
- }
- }
- script 8 (int activator,int x,int y) NET{// receive spectators position
- // printbold(s:"activator 8:",d:activator, s:" X:",f:x,s:" y:",f:y);
- PX[activator] = x;
- PY[activator] = y;
- }
- script 88 (int activator,int z,int angle) NET{// receive spectators position
- // printbold(s:"activator 88:",d:activator,s:" Z:", f:z);
- PZ[activator] = z;
- PAngle[activator] = angle;
- }
- script 89 (int activator,int pitch) NET{// receive spectators position
- // printbold(s:"activator 89:",d:activator,s:" Pitch:", f:pitch);
- PPitch[activator] = pitch;
- }
- script 9 open{//update the spectator object coord
- spawnforced("spectator_ghost",0,0,0,100,0);
- spawnforced("spectator_ghost",0,0,0,101,0);
- spawnforced("spectator_ghost",0,0,0,102,0);
- spawnforced("spectator_ghost",0,0,0,103,0);
- spawnforced("spectator_ghost",0,0,0,104,0);
- while(true){
- SetActorPosition(100,PX[0],PY[0],PZ[0]+10.0,false);
- SetActorPosition(101,PX[1],PY[1],PZ[1]+10.0,false);
- SetActorPosition(102,PX[2],PY[2],PZ[2]+10.0,false);
- SetActorPosition(103,PX[3],PY[3],PZ[3]+10.0,false);
- SetActorPosition(104,PX[4],PY[4],PZ[4]+10.0,false);
- delay(1);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement