SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help > Help Archive

 
 
Thread Tools Display Modes
Old 24/11/2009, 11:46 PM   #1
DeltaAirlines12
Huge Clucker
 
Join Date: May 2009
Posts: 450
Reputation: 5
Default 4 Little Questions.

1. When a player enters a car such as a hydra (Car ID 520) ,
How would I make it say "Vehicle: This vehicle is equipped with bombs, use LMB to drop one."

2. Can other players besides you see smoke grenades and satchel charges?

3. How would I make it so if a player were to enter a FBI rancher, they would have to be logged into the rcon?
(Model ID 490. )

4. In SA-MP debug, when you use /save, no confirmation message appears, is there a way I could manually make it say a message?
Thanks everyone for your feedback.
DeltaAirlines12 is offline  
Old 25/11/2009, 12:15 AM   #2
hoodline
Huge Clucker
 
Join Date: Jan 2008
Location: IRC
Posts: 239
Reputation: 1
Default Re: 4 Little Questions.

1.

Top of script define your vehicles
like so:
#define HYDRA 520
#define FBI 490

In OnPlayerStateChange(playerid, newstate, oldstate)

add

pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == HYDRA)
  {
        GameTextForPlayer(playerid, "Vehicle: This vehicle is equipped with bombs, use LMB to drop one.", 5000, 6);
        return 1;
  }
  return 1;
}

2. Yes

3.

pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == FBI)
  {
    if(!IsPlayerAdmin(playerid)) {
      RemovePlayerFromVehicle(GetPlayerVehicleID(playerid));
      return 1;
    }
    return 1;
  }
  return 1;
}

4.

if save isnt working

in debug mode try using /rs (Raw Save)
it saves the players coords or vehicle coords but with out the AddStaticVehicle or AddPlayerClass you can add them yourself
hoodline is offline  
Old 25/11/2009, 02:56 AM   #3
DeltaAirlines12
Huge Clucker
 
Join Date: May 2009
Posts: 450
Reputation: 5
Default Re: 4 Little Questions.

Quote:
Originally Posted by hoodline
1.

Top of script define your vehicles
like so:
#define HYDRA 520
#define FBI 490

In OnPlayerStateChange(playerid, newstate, oldstate)

add

pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == HYDRA)
  {
        GameTextForPlayer(playerid, "Vehicle: This vehicle is equipped with bombs, use LMB to drop one.", 5000, 6);
        return 1;
  }
  return 1;
}

2. Yes

3.

pawn Code:
public OnPlayerStateChange(playerid, newstate, oldstate)
{
  if(newstate == PLAYER_STATE_DRIVER && GetVehicleModel(GetPlayerVehicleID(playerid)) == FBI)
  {
    if(!IsPlayerAdmin(playerid)) {
      RemovePlayerFromVehicle(GetPlayerVehicleID(playerid));
      return 1;
    }
    return 1;
  }
  return 1;
}

4.

if save isnt working

in debug mode try using /rs (Raw Save)
it saves the players coords or vehicle coords but with out the AddStaticVehicle or AddPlayerClass you can add them yourself
WOW :O Thanks, you help alot!
DeltaAirlines12 is offline  
Old 25/11/2009, 03:20 AM   #4
Enzo_Ferrari_V12
Big Clucker
 
Join Date: Jul 2008
Posts: 66
Reputation: 0
Default Re: 4 Little Questions.

Well he solved everything except the save thing.

jsut do something like...
Code:
new Float:xl
new Float:y;
new Float:z;

dcmd_save or w/e
{
  new string
  GetPlayerPos(playerid,x,y,z);
  FormatString(positions saved! % % %);//I never figured out how to use strings but you get the point.
  SendClientMessage(playerid,string)
}
Enzo_Ferrari_V12 is offline  
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
some questions.. rong13 Help Archive 1 01/10/2009 01:05 PM
Questions rong13 Help Archive 4 27/09/2009 02:26 PM
2 questions beckzy Help Archive 6 21/09/2009 05:46 PM
A few questions. Kevon Help Archive 9 11/07/2009 08:09 PM


All times are GMT. The time now is 01:16 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.