Author Topic: help me with this  (Read 2502 times)

matheo

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-20
  • Virtual owners - Clan Leader
    • View Profile
help me with this
« on: June 11, 2012, 01:07:46 pm »
Hello , who can write for me one thing

1.

If i press command "startbase and number base" class team 1 and 2 (or skin 22/23) teleport to x,y,z . and automatic get ak74 and uzi.

and If i press startarena class team 1 and 2(skin 22/23) teleport to this positions for simple:

I press "startbase 12" so
Skin 22 (class1) teleport x="899.7" y="-442.9" z="19.37"
Skin 23 (class2) teleport x="891.7" y="-434.6" z="19.37"

and they get automatic ak74

2.Commands to remove all cars on server if they spawned

Thanks for reading , sorry for english
We recrutiment to clan !!! ;-)

Rocky

  • Full Member
  • ***
  • Posts: 105
  • Karma: +5/-3
    • View Profile
Re: help me with this
« Reply #1 on: June 11, 2012, 01:35:33 pm »
Code: [Select]
else if(cmd == "startbase")
{
  if(!text) MessagePlayer("/startbase <id>",player);
  else
  {
    if(text.tointeger() == 12)
    {
       while(local i < GetMaxPlayers()+1)
      {
       if(FindPlayer(i))
       {
         if(FindPlayer(i).Class == 0)
         {
             FindPlayer(i).Skin = 22;
             player.Pos = Vector(899.7,-442.9,19.37);
             FindPlayer(i).SetWeapon(5,100000000);
             FindPlayer(i).SetWeapon(3,100000000);
         }
         if(FindPlayer(i).Class == 1)
         {
            FindPlayer(i).Skin = 22;
            FindPlayer(i).Pos = Vector(891.7,-434.6,19.37);
            FindPlayer(i).SetWeapon(5,100000000);
            FindPlayer(i).SetWeapon(3,100000000);
         }
        }
       i++;
       }
   }
  else MessagePlayer("only base id 12 is loaded :/",player);
}
}
           

Code: [Select]
else if(cmd == "remallveh")
{
   local i = 0;
   while(i < GetVehicleCount()+1)
   {
     if(FindVehicle(i))
     {
         FindVehicle(i).Remove();
     }
    i++;
   }
}

Not tested or anything
Look for lu server testers, Requirements are:
English good enough to communicate.
Good knowledge about gaming.

PM me those who are interested.

matheo

  • Jr. Member
  • **
  • Posts: 87
  • Karma: +2/-20
  • Virtual owners - Clan Leader
    • View Profile
Re: help me with this
« Reply #2 on: June 11, 2012, 02:31:59 pm »
line 1
column 4
error :)
We recrutiment to clan !!! ;-)

VetalYA

  • Guest
Re: help me with this
« Reply #3 on: June 11, 2012, 02:57:30 pm »
line 1
column 4
error :)

Dont use else   if this is a first command (onPlayerCommand event).

Rocky

  • Full Member
  • ***
  • Posts: 105
  • Karma: +5/-3
    • View Profile
Re: help me with this
« Reply #4 on: June 11, 2012, 04:40:34 pm »
Thought you were making from a released script so i used else if or you could use switch too (Vortrex idea)
Look for lu server testers, Requirements are:
English good enough to communicate.
Good knowledge about gaming.

PM me those who are interested.

 

© Liberty Unleashed Team.