Thread: Saving Info
View Single Post
  #7  
Old 11-03-2001, 11:28 AM
Poogle Poogle is offline
Registered User
Poogle's Avatar
Join Date: Jun 2001
Posts: 2,471
Poogle is on a distinguished road
hers the script FILL ME UP DOC!

// NPC made by ~|¤Colit¤|~
if (playerenters) {
message BUY ME!;
this.fuel=100;
this.x = x;
this.y = y;
}
if (playertouchsme) {

if (strequals(#c,Get in)){
set incar;
setstring this.owner,#a;
playerx = this.x;
playery = this.y;
hideplayer 1;

} if (strequals(#c,Get in)){
if (this.owner == #a){
set incar;
setstring this.owner,#a;
playerx = this.x;
playery = this.y;
hideplayer 1;
} }}

if (strequals(#c,Exit)) {
enableweapons;
playerdir=2;
playery+=2;
unset incar;
}
while (playerhearts>=0) {
if (incar) {
if (keydown(0)) {
if (!onwall(x+0.5,y-0.5)) {
y-=0.5;
this.fuel = this.fuel-.1;
}
}
if (keydown(1)) {
if (!onwall(x-0.5,y+0.5)) {
x-=0.5;
this.fuel = this.fuel-.1;
}
}
if (keydown(2)) {
if (!onwall(x+0.5,y+2)) {
y+=0.5;
this.fuel = this.fuel-.1;
}
}
if (keydown(3)) {
if (!onwall(x+2,y+0.5)) {
x+=0.5;
this.fuel = this.fuel-.1;
}
}
}}
while (playerhearts>=0) {
if (incar) {
if (keydown(0)) {
if (!onwall(x+0.5,y-0.5)) {
y-=0.5;
this.fuel = this.fuel-.1;
}
this.cardir=0;
}
if (keydown(1)) {
if (!onwall(x-0.5,y+0.5)) {
x-=0.5;
this.fuel = this.fuel-.1;
}
this.cardir=1;
}
if (keydown(2)) {
if (!onwall(x+0.5,y+2)) {
y+=0.5;
this.fuel = this.fuel-.1;
}
this.cardir=2;
}
if (keydown(3)) {
if (!onwall(x+2,y+0.5)) {
x+=0.5;
this.fuel = this.fuel-.1;
}
this.cardir=3;
}
if (exploded) {
this.fuel--;
}
if (this.fuel<=0) {
enableweapons;
unset incar;
}
freezeplayer 0.05;
hideplayer 0.05;
playerx=x-0.5;
playery=y-1;
playerhearts=playerfullhearts;
}
message #v(this.fuel);
sleep 0.05;
}
if (incar){
if (timeout){
message FUEL:#v(this.fuel);
timeout = 1;
}}


now make it so i can fill the tank and save the location when the tank runs out even if they go offline plz help me! i need service stations too (cheaper ten the gas can and faster too!)
Reply With Quote