Banned
|
 |
Join Date: Jul 2005
Location: US
Posts: 5,229
|
|
Plane
Back by request, the thread I deleted! XD Feel free to respond =D (still having trouble with signs and x y in level, but i decided to work on it alone, help wouldn't hurt though  , especially with teh signs)
Quote:
Okay, I'm making a plane for playeruse, only problem is that while flying the player can read signs, and enter buildings(warp out of buildings isn't working right, only for x and y)here's my script, suggestions?
NPC Code:
if (actionserverside) {
if (strequals(#p(0),warp)) {
setlevel2 #s(client.planelevel),#s(client.planex),#s(client. planey);
}
}
//#CLIENTSIDE
// NPC made by Excaliber&&Shadox
if (keypressed&&strequals(#p(1),C)) {
if (this.inuse == 0) {
this.inuse=1;
enableweapons;
setstring client.planespeed,1.25;
timeout=.05
}
else {
timeout = 0;
enabledefmovement;
setstring client.planespeed,0;
this.inuse=0;
hideimg 747;
enableweapons;
}
}
if(timeout&&this.inuse==1&&!isonmap){
triggeraction 0,0,serverside,Plane,warp;
enabledefmovement;
hideimg 747;
this.inuse=0;
}
if (timeout && this.inuse == 1&&isonmap) {
setani idle,;
disabledefmovement;
this.planex=#v(playerx);
this.planey=#v(playery);
setstring client.planex,#v(playerx);
setstring client.planey,#v(playery);
setstring client.planelevel,#L;
if(playerdir==0){
showimg 747,dr-planeN.png,playerx-1,playery-1.5;
}
if(playerdir==2){
showimg 747,dr-planeS.png,playerx-1,playery-1.5;
}
if(playerdir==1){
showimg 747,dr-planeW.png,playerx-1,playery-1.5;
}
if(playerdir==3){
showimg 747,dr-planeE.png,playerx-1,playery-1.5;
}
hideplayer .05;
if (keydown(0)) {
hideimg 747;
showimg 747,dr-planeN.png,playerx-1,playery-1.5;
playerdir = 0;
playery-=strtofloat(#s(client.planespeed));
}
if (keydown(1)) {
hideimg 747;
showimg 747,dr-planeW.png,playerx-1,playery-1.5;
playerdir = 1;
playerx-=strtofloat(#s(client.planespeed));
}
if (keydown(2)) {
hideimg 747;
showimg 747,dr-planeS.png,playerx-1,playery-1.5;
playerdir = 2;
playery+=strtofloat(#s(client.planespeed));
}
if (keydown(3)) {
hideimg 747;
showimg 747,dr-planeE.png,playerx-1,playery-1.5;
playerdir = 3;
playerx+=strtofloat(#s(client.planespeed));
}
if (keydown(0)&&keydown(3)) {
hideimg 747;
showimg 747,dr-planeNE.png,playerx-1,playery-1.5;
}
if (keydown(0)&&keydown(1)) {
hideimg 747;
showimg 747,dr-planeNW.png,playerx-1,playery-1.5;
}
if (keydown(2)&&keydown(3)) {
hideimg 747;
showimg 747,dr-planeSE.png,playerx-1,playery-1.5;
}
if (keydown(2)&&keydown(1)) {
hideimg 747;
showimg 747,dr-planeSW.png,playerx-1,playery-1.5;
}
changeimgzoom 747,1.5;
changeimgvis 747,2;
timeout=.05;
}
if (weaponfired) {
say2 Plane:#b
Press C to take off#b
then, C to land.#b
}
|
|
Last edited by excaliber7388; 10-14-2005 at 08:39 PM..
Reason: formatted a wee bit better :)
|