engine system
+3
Alex_Soloviev
Dexter_Black
Kristian_Hansen
7 posters
Page 1 of 1
engine system
I will ask for a new Engine system where people have to press /engine on and /engine off.. And people "can" take seatbelt on example
/seatbelt on /seatbelt off. It will be a cool system..
Kristian Hansen-Leader of DMV
And a system when people talk they will do /Chat automatic's.
/seatbelt on /seatbelt off. It will be a cool system..
Kristian Hansen-Leader of DMV
And a system when people talk they will do /Chat automatic's.
Kristian_Hansen- RP God
- Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23
Character story
Character information:
Re: engine system
You mean like this?
Starting with Tab Key...
Homers script
- Code:
Deleted!
Starting with Tab Key...
Homers script
Last edited by Dexter_Black on Fri May 16, 2008 6:28 pm; edited 2 times in total (Reason for editing : Deleted)
Dexter_Black- Intermediate RP-er
- Number of posts : 84
Registration date : 2008-03-24
Character story
Character information:
Re: engine system
Okaaaaaaaay? I dont know that script thing's but Yes!!
Kristian_Hansen- RP God
- Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23
Character story
Character information:
Re: engine system
Oh... And i made the seatbelt thing 2...
I copied here the whole FS (delete the color definition + include and don't use publics, just for you to know )
Funcs:
*Dexter_Black unfastens his seatbelt
*Dexter_Black fastens his seatbelt
- Code:
#include <a_samp>
#define COLOR_GENERAL 0xC2A2DAAA
new Fasten[MAX_PLAYERS];
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public OnPlayerConnect(playerid)
{
Fasten[playerid] = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/fs", cmdtext, true, 10) == 0)
{
new sendername[MAX_PLAYER_NAME];
new string[256];
if(IsPlayerInAnyVehicle(playerid))
{
if(Fasten[playerid] == 0)
{
Fasten[playerid] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s fastens his seatbelt.", sendername);
ProxDetector(30.0, playerid, string, COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL);
}else{
Fasten[playerid] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s unfastens his seatbelt.", sendername);
ProxDetector(30.0, playerid, string, COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL);
}
}
return 1;
}
return 0;
}
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
}
I copied here the whole FS (delete the color definition + include and don't use publics, just for you to know )
Funcs:
- use /fs to (un)fasten seatbelt
- it isn't so bugged like you can do 2 times (un)fasten
- I like hamburgers
*Dexter_Black unfastens his seatbelt
*Dexter_Black fastens his seatbelt
Dexter_Black- Intermediate RP-er
- Number of posts : 84
Registration date : 2008-03-24
Character story
Character information:
Re: engine system
COOOL!!!!!!!
Kristian_Hansen- RP God
- Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23
Character story
Character information:
Re: engine system
Can someone make a code to me with a /engine on Engine off system, my friend needs it.
Kristian_Hansen- RP God
- Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23
Character story
Character information:
Re: engine system
The code was there but I deleted it, so noone could copy it. Make your own or visit sa-mp forum.
Dexter_Black- Intermediate RP-er
- Number of posts : 84
Registration date : 2008-03-24
Character story
Character information:
Re: engine system
Suddenly you find out that. People can just come and copy.
Kristian_Hansen- RP God
- Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23
Character story
Character information:
ok guys
what about with the balets you cant get out beof r you type again /fs you type /fs you can get out what about that?
Alex_Soloviev- Moderator
- Number of posts : 148
Registration date : 2008-04-23
Character story
Character information: leader of medic/FM
Re: engine system
Nice code there, Dexter!
Oormore- Regular RP-er
- Number of posts : 23
Registration date : 2008-05-02
Character story
Character information:
Re: engine system
Tried sa-mp forunms yet?
SA-MP developers left.
SA-MP developers left.
Nglsk- Administrator
- Number of posts : 81
Age : 31
Registration date : 2008-04-19
Character story
Character information:
Re: engine system
People cant get out when they got seatbelt on. Only when they got it off.
Kristian_Hansen- RP God
- Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23
Character story
Character information:
Re: engine system
Lol so tought guys, just edit this to:
Lol xP
- Code:
new Fasten[MAX_PLAYERS];
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public OnPlayerConnect(playerid)
{
Fasten[playerid] = 0;
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/fs", cmdtext, true, 10) == 0)
{
new sendername[MAX_PLAYER_NAME];
new string[256];
if(IsPlayerInAnyVehicle(playerid))
{
if(Fasten[playerid] == 0)
{
Fasten[playerid] = 1;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s fastens his seatbelt.", sendername);
ProxDetector(30.0, playerid, string, COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL);
TogglePlayerControllable(playerid,0);
}else{
Fasten[playerid] = 0;
GetPlayerName(playerid, sendername, sizeof(sendername));
format(string, sizeof(string), "* %s unfastens his seatbelt.", sendername);
ProxDetector(30.0, playerid, string, COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL,COLOR_GENERAL);
TogglePlayerControllable(playerid,1);
}
}
return 1;
}
return 0;
}
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}
}
Lol xP
Dexter_Black- Intermediate RP-er
- Number of posts : 84
Registration date : 2008-03-24
Character story
Character information:
Re: engine system
me thinks I'll be stealing your ProxDetector function, tis a very nice function <3
Oormore- Regular RP-er
- Number of posts : 23
Registration date : 2008-05-02
Character story
Character information:
Re: engine system
/me says: Copy, I know your a lama, so copy it dumass
Dexter_Black- Intermediate RP-er
- Number of posts : 84
Registration date : 2008-03-24
Character story
Character information:
Re: engine system
LOL, thought you where a 'very very good' scripter...
Good scripters don't copy anything.
Good scripters don't copy anything.
Jimmy_Hernandez- Administrator
- Number of posts : 279
Woonplaats : Oisterwijk - The Netherlands
Registration date : 2008-03-09
Character story
Character information: PD Sheriff (Leader) Jimmy Hernandez
Re: engine system
Jimmy, can you add the hiddern area for FBI please and maybe give me adminstrator for only that part of the forum? thanks
back on topic, me likes engine system
back on topic, me likes engine system
James- Intermediate RP-er
- Number of posts : 64
Registration date : 2008-04-27
Re: engine system
He he, everyone that copied the code is a n00b. I made the code that way that when you do /fs you get freezed (Even the driver) xD xD xP
Dexter_Black- Intermediate RP-er
- Number of posts : 84
Registration date : 2008-03-24
Character story
Character information:
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|