Grand Canyon RP (Desert/Wild West Style)
Would you like to react to this message? Create an account in a few clicks or log in to continue.

engine system

+3
Alex_Soloviev
Dexter_Black
Kristian_Hansen
7 posters

Go down

engine system Empty engine system

Post  Kristian_Hansen Fri May 16, 2008 4:48 pm

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. Very Happy It will be a cool system..

Kristian Hansen-Leader of DMV

And a system when people talk they will do /Chat automatic's. Very Happy
Kristian_Hansen
Kristian_Hansen
RP God
RP God

Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23

Character story
Character information:

http://www.Wildwest-rp.co.nr

Back to top Go down

engine system Empty Re: engine system

Post  Dexter_Black Fri May 16, 2008 5:03 pm

You mean like this?

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
Dexter_Black
Intermediate RP-er
Intermediate RP-er

Number of posts : 84
Registration date : 2008-03-24

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Kristian_Hansen Fri May 16, 2008 5:09 pm

Okaaaaaaaay? I dont know that script thing's but Yes!! Very Happy
Kristian_Hansen
Kristian_Hansen
RP God
RP God

Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23

Character story
Character information:

http://www.Wildwest-rp.co.nr

Back to top Go down

engine system Empty Re: engine system

Post  Dexter_Black Fri May 16, 2008 5:42 pm

Oh... And i made the seatbelt thing 2...

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 Wink )
Funcs:

  1. use /fs to (un)fasten seatbelt
  2. it isn't so bugged like you can do 2 times (un)fasten
  3. I like hamburgers


*Dexter_Black unfastens his seatbelt
*Dexter_Black fastens his seatbelt
Dexter_Black
Dexter_Black
Intermediate RP-er
Intermediate RP-er

Number of posts : 84
Registration date : 2008-03-24

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Kristian_Hansen Fri May 16, 2008 8:02 pm

COOOL!!!!!!!
Kristian_Hansen
Kristian_Hansen
RP God
RP God

Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23

Character story
Character information:

http://www.Wildwest-rp.co.nr

Back to top Go down

engine system Empty Re: engine system

Post  Kristian_Hansen Fri May 16, 2008 10:35 pm

Can someone make a code to me with a /engine on Engine off system, my friend needs it. Very Happy
Kristian_Hansen
Kristian_Hansen
RP God
RP God

Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23

Character story
Character information:

http://www.Wildwest-rp.co.nr

Back to top Go down

engine system Empty Re: engine system

Post  Dexter_Black Sat May 17, 2008 7:31 am

The code was there but I deleted it, so noone could copy it. Make your own or visit sa-mp forum.
Dexter_Black
Dexter_Black
Intermediate RP-er
Intermediate RP-er

Number of posts : 84
Registration date : 2008-03-24

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Kristian_Hansen Sat May 17, 2008 9:38 am

Suddenly you find out that. People can just come and copy. Very Happy
Kristian_Hansen
Kristian_Hansen
RP God
RP God

Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23

Character story
Character information:

http://www.Wildwest-rp.co.nr

Back to top Go down

engine system Empty ok guys

Post  Alex_Soloviev Sat May 17, 2008 10:00 pm

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
Alex_Soloviev
Moderator

Number of posts : 148
Registration date : 2008-04-23

Character story
Character information: leader of medic/FM

http://ls-rp.at.ua/

Back to top Go down

engine system Empty Re: engine system

Post  Oormore Sat May 17, 2008 10:05 pm

Nice code there, Dexter!

Oormore
Regular RP-er
Regular RP-er

Number of posts : 23
Registration date : 2008-05-02

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Nglsk Sun May 18, 2008 12:36 am

Tried sa-mp forunms yet?
SA-MP developers left. Neutral
Nglsk
Nglsk
Administrator

Number of posts : 81
Age : 31
Registration date : 2008-04-19

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Kristian_Hansen Sun May 18, 2008 12:24 pm

People cant get out when they got seatbelt on. Only when they got it off. Razz
Kristian_Hansen
Kristian_Hansen
RP God
RP God

Number of posts : 133
Age : 30
Woonplaats : Lumby Denmark
Registration date : 2008-04-23

Character story
Character information:

http://www.Wildwest-rp.co.nr

Back to top Go down

engine system Empty Re: engine system

Post  Dexter_Black Sun May 18, 2008 5:18 pm

Lol so tought guys, just edit this to:

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
Dexter_Black
Intermediate RP-er
Intermediate RP-er

Number of posts : 84
Registration date : 2008-03-24

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Oormore Sun May 18, 2008 6:21 pm

me thinks I'll be stealing your ProxDetector function, tis a very nice function <3

Oormore
Regular RP-er
Regular RP-er

Number of posts : 23
Registration date : 2008-05-02

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Dexter_Black Sun May 18, 2008 6:31 pm

/me says: Copy, I know your a lama, so copy it dumass
Dexter_Black
Dexter_Black
Intermediate RP-er
Intermediate RP-er

Number of posts : 84
Registration date : 2008-03-24

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Jimmy_Hernandez Sun May 18, 2008 6:35 pm

LOL, thought you where a 'very very good' scripter...

Good scripters don't copy anything.
Jimmy_Hernandez
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

https://nextgeneration2008.forumotion.com

Back to top Go down

engine system Empty Re: engine system

Post  James Sun May 18, 2008 7:12 pm

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 Very Happy

James
Intermediate RP-er
Intermediate RP-er

Number of posts : 64
Registration date : 2008-04-27

Back to top Go down

engine system Empty Re: engine system

Post  Dexter_Black Mon May 19, 2008 4:54 pm

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
Dexter_Black
Intermediate RP-er
Intermediate RP-er

Number of posts : 84
Registration date : 2008-03-24

Character story
Character information:

Back to top Go down

engine system Empty Re: engine system

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum