How to create Automatic Gates to one Team ? Plz Reply me
#1

Hey guys...

Today i have a problem, i know how to do the automatic gates but i have a problem how to create gate for the team and how to crate a team and how to put me in Team ofc who know PLEASE say to me how to do this

Here is an example i do

AddAutoGate(980,2087.664306, 2314.904541, 12.000000,0.0,0.0,325.00,2087.664306,2314.904541,0 .000000,"TEAM_BLUE",10);

where i have the "TEAM_BLUE" i have to put the Team but if i dont put nothing the gates are opened to all and i dont know how to crate the Team and how to put me In the Team
Reply
#2

i searched searched searched and nothing
Reply
#3

Um, what exactly do you want to do? Do you want to make a command to make someone in TEAM_BLUE ?
Reply
#4

its for example put me in the Team and when i go near the gate it open



"TEAM_BLUE" is an example
Reply
#5

So you want to be put in TEAM_BLUE when you go near the gate? Or do you want a command to make someone in TEAM_BLUE?
Reply
#6

yes do a cmd to go to team and crate a team too idk how to create

if you can help me you are my god
Reply
#7

Can you show me the stock for AddPlayerGate? Or if you got it in an .inc, send me that?
Reply
#8

my automatic gate is of here

http://forum.sa-mp.com/index.php?topic=73014.0
Reply
#9

so you can help me?
Reply
#10

From what I can tell, you have to rename the player who wants to open the door, though I'm not 100% sure. If that is true, then make a command like the following. However, if you don't want it to be by name, as obviously, someone could just make an account with this name, say so.

Put this at the top with your defines: dcmd
Put this at the BOTTOM: sscanf
Put this in the OnPlayerCommandText callback:
pawn Code:
dcmd(invite,6,cmdtext);
Put this on top of the sscanf:
pawn Code:
dcmd_invite(playerid, params[]) // Makes a new command
{
  new id; // new variable called "id"
  if(sscanf(params,"u",id)) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: \"/invite [playerid/part of player name]\""); // this takes everything after /invite. If there's nothing, it sends a message stating usage
  if(id == INVALID_PLAYER_ID||id == playerid) SendClientMessage(playerid, 0xFF0000FF, "Invalid player ID!"); // If it's a bad playerid, or the id is the same as the player, then it sends an error
  else // if everything is good
  {
    new name,newname; // two variables to store our names in
    GetPlayerName(id,name,sizeof(name)); // Gets the name and saves it in "name"
    format(newname,sizeof(newname),"[TEAM_BLUE] %s",name); // formats "newname" to have the tag [TEAM_BLUE] and adds the old name to the end
    SetPlayerName(id, newname); // Finally, it sets the invited person's name
  }
  return 1;
}
Now, there a couple of issues with this, like the fact that ANYONE can do this command, but this can be recitified with GetPlayerName+strfind.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)