Welcome, Guest. Please login or register.
Did you miss your activation email?
September 05, 2010, 06:18:34 am
News:
Welcome to unofficial VC:MP forums!

Pages: 1 [2]
Print
Author Topic: Roleplay Deathmatch Script V0.1  (Read 436 times)
NC;p
Newbie
*
Posts: 27


View Profile
« Reply #15 on: July 25, 2010, 10:44:22 pm »

Yes and I want change skins name. Where i can do this?I must on FBS and RDS at the same time in one server?

Moro moro. Możesz zrobić własną funkcję, która by wyświetlała twoje nazwy skinów prościzna :p.

This can be done by creating a new function bla bla().
Logged

Moje prace i inne gowna
http://murzyn.heliohost.org
Javi
Newbie
*
Posts: 38


View Profile WWW
« Reply #16 on: July 25, 2010, 11:34:57 pm »

It's probably a problem when it reads "999999" from the hash. That shouldn't happen actually.
Logged
WACEK
Newbie
*
Posts: 9


View Profile
« Reply #17 on: July 26, 2010, 12:27:06 am »

Quote
It's probably a problem when it reads "999999" from the hash. That shouldn't happen actually.

WoW. Meybe this been that, because who killed me, when i haved 0$, because i edit cash agin and write 0$. This is bug?

Quote
Moro moro. Możesz zrobić własną funkcję, która by wyświetlała twoje nazwy skinów prościzna :p.

Że taką komendę idzie zrobić, to się domyśliłem po tym, co napisał pan Javi. Tylko teraz pytanie na jakiej zasadzie ona będzie działała, kiedy i gdzie mam ją wstawić w skrypcie.
« Last Edit: July 26, 2010, 12:30:45 am by WACEK » Logged
NC;p
Newbie
*
Posts: 27


View Profile
« Reply #18 on: July 26, 2010, 05:40:17 pm »

@Wacek: Numerujesz sobie skiny, robisz np. if tam skin == 1, 2, 3 to wyświetl tekst z nazwą. To możesz wrzucić do zdarzenia onPlayerRequestClass. Na wiki masz przykład, który ja kiedys zrobiłem a jakiś nub go zedytował :<.
Logged

Moje prace i inne gowna
http://murzyn.heliohost.org
WACEK
Newbie
*
Posts: 9


View Profile
« Reply #19 on: July 27, 2010, 05:51:10 pm »

Quote
@Wacek: Numerujesz sobie skiny, robisz np. if tam skin == 1, 2, 3 to wyświetl tekst z nazwą. To możesz wrzucić do zdarzenia onPlayerRequestClass. Na wiki masz przykład, który ja kiedys zrobiłem a jakiś nub go zedytował :<.

O to ci chodzi?
http://liberty-unleashed.co.uk/VCWiki/Scripting/Squirrel/Events/Player/onPlayerRequestClass

z tym, że tam nie ma żadnego if. A jak o to ci chodzi, to pod jaką linijką mam to wkleić w RDS?
Logged
NC;p
Newbie
*
Posts: 27


View Profile
« Reply #20 on: July 30, 2010, 01:06:10 pm »

Dam ci taki przykład z mojego skryptu z SFS. Znowu improwizowany bo dokładnie nie pamiętam.

Code:
function NazwaSkina( id ) {
if ( id == 1 ) return "Zul";
else if ( id == 2 ) return "Murzyn";
}

function onPlayerblablabla no to co ci podałem niżej :p () {
PrivMessage( "Ogladasz skin: " + NazwaSkina( Skin ) )
}

Coś takiego mniej więcej. Dasz radę?
Logged

Moje prace i inne gowna
http://murzyn.heliohost.org
[RD]Edward
Newbie
*
Posts: 10


View Profile
« Reply #21 on: August 17, 2010, 12:24:48 am »

Exelent SCRIPTS Cheesy

Can u try to fix the !buycar commands, and make !armour command ! Cheesy

And make fun cmds Smiley

Thanks..
Logged
Javi
Newbie
*
Posts: 38


View Profile WWW
« Reply #22 on: August 17, 2010, 01:26:37 pm »

I've tested all the vehicle commands and they work. !Armour is very easy to make, just copy and paste !heal, and change .Health to .Armour
Logged
[RD]Edward
Newbie
*
Posts: 10


View Profile
« Reply #23 on: August 17, 2010, 04:10:16 pm »

Hello,

When I type !buycar , nothing ... don't work, no show a msg , miss money  !!

When I try to create a command, like armour !!... SCRIPT stop working :S dunno why ..

Look:

    }
   
   else if ( cmd == "heal" )
   {
      if ( GetPass( player ) )
      {
         if ( GetLoggedStatus( player ) == "True" )
         {
            local Cost = 350 - player.Health * 2;
            
            if ( GetCash( player ) >= Cost.tointeger() )
            {
               if ( player.Health == 100 ) PrivMessage( "Error - You don't need to heal.", player );
               
               else
               {
                  player.Health = 100;
                  SetCash( player, GetCash( player ) - Cost.tointeger() );
                  PrivMessage( "You have been healed. Cost: $" + Cost, player );
               }
            }
            else PrivMessage( "Error - You need at least $" + Cost + " to heal.", player );
         }
         else PrivMessage( "Error - You are not logged in.", player );
      }
      else PrivMessage( "Error - You haven't registered your nickname.", player );
   }
   
        else if ( cmd == "armour" )
   {
      if ( GetPass( player ) )
      {
         if ( GetLoggedStatus( player ) == "True" )
         {
            local Cost = 350 - player.Armour * 2;
            
            if ( GetCash( player ) >= Cost.tointeger() )
            {
               if ( player.Armour == 100 ) PrivMessage( "Error - You don't need to heal.", player );
               
               else
               {
                  player.Armour = 100;
                  SetCash( player, GetCash( player ) - Cost.tointeger() );
                  PrivMessage( "You have been healed. Cost: $" + Cost, player );
               }
            }
            else PrivMessage( "Error - You need at least $" + Cost + " to heal.", player );
         }
         else PrivMessage( "Error - You are not logged in.", player );
      }
      else PrivMessage( "Error - You haven't registered your nickname.", player );
   }

   else if ( cmd == "admin" )




Buycar don't  show a msg when I don't have money !! . Look very well !

else if ( cmd == "buycar" )
   {
      if ( GetPass( player ) )
      {
         if ( GetLoggedStatus( player ) == "True" )
         {
            if ( player.Vehicle )
            {
               local Cars = QuerySQL( db, "SELECT Owner FROM Vehicles WHERE ID LIKE '" + player.Vehicle.ID + "'" );
               local Cost = QuerySQL( db, "SELECT Cost FROM VehicleCost WHERE Name LIKE '" + GetVehicleNameFromModel( player.Vehicle.Model ) + "'" );
               
               if ( GetSQLColumnData( Cars, 0 ) ) PrivMessage( "Error - This car is already owned.", player );
               else
               {
                  if ( GetCash( player ) >= GetSQLColumnData( Cost, 0 ).tointeger() )
                  {
                     QuerySQL( db, "INSERT INTO Vehicles ( ID, Owner, Name ) values ( '" + player.Vehicle.ID + "', '" + player.Name + "', '" + GetVehicleNameFromModel( player.Vehicle.Model ) + "' )" );
                     
                     PrivMessage( "You just bought a " + GetVehicleNameFromModel( player.Vehicle.Model ) + " for $" + GetSQLColumnData( Cost, 0 ), player );
                     PrivMessage( "You can now use the following commands: !sellcar, !sharecar, !delsharecar, !getcar", player );
                     
                     SetCash( player, GetCash( player ) - GetSQLColumnData( Cost, 0 ).tointeger() );
                  }
               }
            }
            else PrivMessage( "Error - You need to be in the vehicle you want to buy.", player );
         }
         else PrivMessage( "Error - You are not logged in.", player );
      }
      else PrivMessage( "Error - You haven't registered your nickname.", player );
   }
Logged
Foxtrot
Newbie
*
Posts: 1


View Profile
« Reply #24 on: August 17, 2010, 09:47:13 pm »

next time use the # thingy

Logged
Javi
Newbie
*
Posts: 38


View Profile WWW
« Reply #25 on: August 19, 2010, 12:31:54 pm »

Code:
  if ( GetCash( player ) >= GetSQLColumnData( Cost, 0 ).tointeger() )
                  {
                     QuerySQL( db, "INSERT INTO Vehicles ( ID, Owner, Name ) values ( '" + player.Vehicle.ID + "', '" + player.Name + "', '" + GetVehicleNameFromModel( player.Vehicle.Model ) + "' )" );
                     
                     PrivMessage( "You just bought a " + GetVehicleNameFromModel( player.Vehicle.Model ) + " for $" + GetSQLColumnData( Cost, 0 ), player );
                     PrivMessage( "You can now use the following commands: !sellcar, !sharecar, !delsharecar, !getcar", player );
                     
                     SetCash( player, GetCash( player ) - GetSQLColumnData( Cost, 0 ).tointeger() );
                  }

You have that, change it to this:

Code:
  if ( GetCash( player ) >= GetSQLColumnData( Cost, 0 ).tointeger() )
                  {
                     QuerySQL( db, "INSERT INTO Vehicles ( ID, Owner, Name ) values ( '" + player.Vehicle.ID + "', '" + player.Name + "', '" + GetVehicleNameFromModel( player.Vehicle.Model ) + "' )" );
                     
                     PrivMessage( "You just bought a " + GetVehicleNameFromModel( player.Vehicle.Model ) + " for $" + GetSQLColumnData( Cost, 0 ), player );
                     PrivMessage( "You can now use the following commands: !sellcar, !sharecar, !delsharecar, !getcar", player );
                     
                     SetCash( player, GetCash( player ) - GetSQLColumnData( Cost, 0 ).tointeger() );
                  }
                  else PrivMessage( "Error - You don't have enough money.", player );

About the !armour command, that's not my fault if you can't script. I noticed you have a bracket at the top and it shouldn't be there...
Logged
[RD]Edward
Newbie
*
Posts: 10


View Profile
« Reply #26 on: August 20, 2010, 05:42:34 am »

Please, post the buycar command complete ... FIXED AND TESTED Cheesy

And please, can u make !givecash

thanks !

EXELENT SCRIPTS !
« Last Edit: August 23, 2010, 07:19:26 pm by [RD]Edward » Logged
Pages: 1 [2]
Print
 
Jump to: