Sorry Sergey, your method didn't work, and Mr Valentine, we don't want to randomise players
This is the player drawing script for other players apart from myself
IF ar_players(x).id > 0
IF x <> playerid
rem Get Other players and current players position on the map.
p2_plx = ar_players(x).plx
p2_ply = ar_players(x).ply
p1_plx = ar_players(playerid).plx
p1_ply = ar_players(playerid).ply
rem Get current players position relative to the screen.
a_x = p1_plx - p2_plx
a_y = p1_ply - p2_ply
b_x = (screenwidth/2) + a_x
b_y = (screenheight/2) + a_y
c_i = x+3000
c_s = ar_players(x).ship
c_a = ar_players(x).angle
SPRITE c_i,b_x,b_y,c_s
ROTATE SPRITE c_i,c_a
offset sprite c_i,sprite width(c_i)*.5,sprite height(c_i)*.5
text b_x,b_y-40, str$(p2_plx) + " - " + str$(p2_ply)
ENDIF
ENDIF
This is the code used for moving the player and drawing the player controlling
cls
curMouseX = mousex() - sprite x(ar_players(playerid).ship)
curMouseY = mousey() - sprite y(ar_players(playerid).ship)
ar_players(playerid).angle = -atanfull(curMouseX,curMouseY)
IF KEYSTATE(200) or KEYSTATE(208)
if keystate(200)
ar_players(playerid).speed = ar_players(playerid).speed + 0.4
if ar_players(playerid).speed > ar_players(playerid).mspee then ar_players(playerid).speed = ar_players(playerid).mspee
endif
if keystate(208)
ar_players(playerid).speed = ar_players(playerid).speed - 0.4
if ar_players(playerid).speed < -ar_players(playerid).mspee then ar_players(playerid).speed = -ar_players(playerid).mspee
endif
ELSE
if ar_players(playerid).speed > 0.2 then ar_players(playerid).speed = ar_players(playerid).speed - 0.2
IF ar_players(playerid).speed < 0.2 THEN ar_players(playerid).speed = ar_players(playerid).speed + 0.2
if ar_players(playerid).speed > 0.2 and ar_players(playerid).speed < 0.2 then ar_players(playerid).speed = 0.0
ENDIF
curx# = sprite x(ar_players(playerid).ship)
cury# = sprite y(ar_players(playerid).ship)
move sprite ar_players(playerid).ship,-ar_players(playerid).speed
newx# = sprite x(ar_players(playerid).ship)
newy# = sprite y(ar_players(playerid).ship)
move sprite ar_players(playerid).ship,ar_players(playerid).speed
movx# = curx# - newx#
movy# = cury# - newy#
ar_players(playerid).plx = ar_players(playerid).plx - movx#
ar_players(playerid).ply = ar_players(playerid).ply - movy#
for k = 1 to 9
SX(k) = SX(k) + movx#
SY(k) = SY(k) + movy#
if SX(k)<-1024 then SX(k) = 2048
if SY(k)<-1024 then SY(k) = 2048
if SX(k)>2048 then SX(k) = -1024
if SY(k)>2048 then SY(k) = -1024
PASTE IMAGE k,SX(k),SY(k)
next k
for k = 1 to 830
ar_planet(k).plx = ar_planet(k).plx + movx#
ar_planet(k).ply = ar_planet(k).ply + movy#
if ar_planet(k).plx > -300 and ar_planet(k).ply > -300 and ar_planet(k).plx < desktopwidth and ar_planet(k).ply < desktopheight
text ar_planet(k).plx + 150 - ((len(ar_planet(k).name)/2)*8),ar_planet(k).ply+10,ar_planet(k).name
rem == Fixed by TheComet
PASTE IMAGE ar_planet(k).typ + 99 ,ar_planet(k).plx,ar_planet(k).ply,1
else
tex = ar_planet(k).plx+150
tey = ar_planet(k).ply+150
if tex > -5000 and tex< 5000 and tey>-5000 and tey < 5000
if tex < 0 then tex =0
if tex > desktopwidth - 30 then tex = desktopwidth - 20
if tey < 0 then tey = 0
if tey > desktopheight - 20 then tey = desktopheight - 20
PASTE IMAGE ar_planesp(k).typ + 119,tex,tey,1
endif
endif
next k
NET PUT BYTE MESSAGE_ID_GENERAL
NET PUT FLOAT ar_players(playerid).plx
net put float ar_players(playerid).ply
net put float ar_players(playerid).angle
net put int ar_players(playerid).ship
net put float ar_players(playerid).speed
net send
