Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - omersami2

Pages: [1]
1
ShowRoom (pawn) / Re: save you pos for spawn!!
« on: November 29, 2013, 01:49:07 am »
Hello again, today i teach you how make the command for spawn in one location always.. if you "save you position"
|Video|
http://www.youtube.com/watch?v=l957Ac0kBP0&feature=youtu.be

[pawn]new Float:CoordX[MAX_PLAYERS];
new Float:CoordY[MAX_PLAYERS];
new Float:CoordZ[MAX_PLAYERS];[/pawn]

In the command "REGISTER" COPY THIS DINI_SET

      [pawn]   dini_Set( file, "pX", "-695.528503" );
         dini_Set( file, "pY", "706.554931" );
         dini_Set( file, "pZ", "12.116538" );[/pawn]


IN ONPLAYERTEXT

   [pawn]          else if ( strcmp( cmd, "!spawn", true ) == 0 )
   {
         tmp = strtok( cmdtext, idx );
         new Dinero = GetPlayerMoney(playerid);
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, 0xF0182DFF, "Login first." );
         else
       {
      if(Dinero >= 1500) {
    format(file, sizeof(file), USERS_FILE, gPlayers[playerid]);
    GetPlayerPos(playerid, CoordX[playerid], CoordY[playerid], CoordZ[playerid]);
   dini_FloatSet(file, "pY", CoordY[playerid]);
    dini_FloatSet(file, "pZ", CoordZ[playerid]);
     dini_FloatSet(file, "pX", CoordX[playerid]);
    SendClientMessage(playerid,0xFFFF00AA,"You are saved you position to spawn");
           DecPlayerHandCash(playerid,1500);
          }
           if(Dinero < 1499) {
           SendClientMessage(playerid,0xFFFF00AA,"Need more money to save you position, need $ 1500");
           }
}
       return 1;
   }[/pawn]

in ONPLAYERSPAWN

[pawn]SetPlayerPos(playerid, dini_Float(file, "pX"), dini_Float(file, "pY"), dini_Float(file, "pZ"),0,0);
SendClientMessage(playerid,0xFFFF00AA,"You have send to you last position saved");[/pawn]



If you need thank me, send me a pm
Nice MAn Keep It UP

2
ShowRoom (pawn) / Re: Vehicle System
« on: November 29, 2013, 01:48:34 am »
[pawn]//      NOT FORGET DOWNLOAD THE FOLDER OF VEHICLES AND PUT IN YOU FOLDER SCRIPTFILES
//      SYSTEM TESTED IN SCRIPT FROM 0 (FALCON), AND IN GUPS "DELETED THE SYSTEM OF CAR IN GUPS AND PUT THIS"


 /*if you have the public assigned only copy the text inside*/
//==============================================================================
public OnPlayerEnterVehicle(playerid,vehicleid,ispassenger)
{
              new id, Float:hp;
               id = GetPlayerVehicleID( playerid );
               GetVehicleHealth( GetPlayerVehicleID( playerid ), hp );
               hp = ( hp / 1000.00 ) * 1000;
                new string[256];
            format( string, sizeof( string ), "ID:[ %d ] Health:[ %.0f% ] Owner:[ %s ] Price:[ $%d ]", id, hp, VehicleInfo[ id ][ Propietario ], VehicleInfo[ id ][ Precio ] );
            SendClientMessage( playerid, COLOR_GREEN, string );
            if(InfoAutoCerrado(playerid,vehicleid)) return 0;
   return 1;
}
//==============================================================================

/* IN public OnGameModeInit PUT THIS*/
CargarAutos();
//==============================================================================

                 /*Put this in public OnPlayerText*/

             else if (strcmp(cmd, "!close", true) == 0) {
      tmp = strtok(cmdtext, idx);
       if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Logueate primero." );
       if (!strlen(tmp)) Mensaje(playerid, GREEN,"[Sistema] - USAGE: !cerrar <ID> .");
              else if (!SiExiste(strval(tmp))) Mensaje(playerid, GREEN,"[Error] -This vehicle not exist.");
              else if ( !IsVehiclePropietario( strval( tmp ), playerid ) ) Mensaje( playerid, COLOR_GREEN, "Error: Este vehiculo no te pertenece." );
           else {
                            AutoCerrado(playerid,strval(tmp));
        }
      return 1;
   }
                else if (strcmp(cmd, "!open", true) == 0) {
      tmp = strtok(cmdtext, idx);
       if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Logueate en tu cuenta." );
       if (!strlen(tmp)) Mensaje(playerid, GREEN,"[Sistema] - USAGE: !open <ID>.");
              else if (!SiExiste(strval(tmp))) Mensaje(playerid, GREEN,"[Error] - this vehicle not exist.");
              else if ( !IsVehiclePropietario( strval( tmp ), playerid ) ) Mensaje( playerid, COLOR_GREEN, "Error: Este vehiculo no te pertenece." );
           else {
                            AutoAbierto(playerid,strval(tmp));
                           }
      return 1;
   }
               else if ( strcmp( cmd, "!buycar", true ) == 0 )
   {
         tmp = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, ROJO, "Please log-in to your account." );
      else if ( !strlen( tmp ) ) Mensaje( playerid, AMARILLO, "USAGE: !open [VehicleID]" );
      else if ( !SiEstaEnVenta( strval( tmp ) ) ) Mensaje( playerid, ROJO, "Error: That vehicle is not for sale." );
      else
      {
          new cost = GetCostoAuto( strval( tmp ) );
          if ( GetPlayerHandCash( gPlayers[ playerid ] ) < cost )
         {
            SendClientMessage( playerid, COLOR_GREEN, "Error: Not have money to buy a car!" );
             return 1;
         }
         format( file, sizeof( file ), "/Autos/propietario.ini", "propietario" );
         dini_Set( file, tmp, gPlayers[ playerid ] );

         new propietario[256]; propietario = gPlayers[ playerid ];
         VehicleInfo[ strval( tmp ) ][ Propietario ] = propietario;

         DecPlayerHandCash( playerid, cost );

         format( szMsg, sizeof( szMsg ), "Vehicle bought for:[ $%d ]", cost );
         SendClientMessage( playerid, COLOR_GREEN, szMsg );
      }
      return 1;
   }
   else if ( strcmp( cmd, "!sellcar", true ) == 0 )
   {
         tmp = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) Mensaje( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen( tmp ) ) Mensaje( playerid, COLOR_GREEN, "USAGE: !sellcar [VehicleID]" );
      else if ( !IsVehiclePropietario( strval( tmp ), playerid ) ) SendClientMessage( playerid, COLOR_GREEN, "Error: That vehicle is not yours." );
      else
      {
          new cost = GetCostoAuto( strval( tmp ) ), npropietario[256]; npropietario = "Automotora Sunshine Ltda.";
         format( file, sizeof( file ), "/Autos/propietario.ini", "propietario" );
         dini_Set( file, tmp, "Automotora Sunshine Ltda." );
         VehicleInfo[ strval( tmp ) ][Propietario] = npropietario;

         IncPlayerHandCash( playerid, cost );

         format( szMsg, sizeof( szMsg ), "Vehicle sold for:[ $%d ]", cost );
         SendClientMessage( playerid, COLOR_GREEN, szMsg );
      }
      return 1;
   }
                  else if ( strcmp( cmd, "!car", true ) == 0 )
   {
      tmp = strtok( cmdtext, idx );
      new plr = FindPlayerIDFromString( tmp );
      if ( !strlen( tmp ) )
      {
           if ( IsPlayerInAnyVehicle( playerid ) )
         {
               new id, Float:hp;
               id = GetPlayerVehicleID( playerid );
               GetVehicleHealth( GetPlayerVehicleID( playerid ), hp );
               hp = ( hp / 1000.00 ) * 1000;

            format( szMsg, sizeof( szMsg ), "ID:[ %d ] Health:[ %.0f% ] Propietario:[ %s ] Precio:[ $%d ]", id, hp, VehicleInfo[ id ][ Propietario ], VehicleInfo[ id ][ Precio ] );
            SendClientMessage( playerid, COLOR_GREEN, szMsg );
           }
         else SendClientMessage( playerid, COLOR_GREEN, "You are currently on foot or passenger." );
      }
      else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, ROJO, "Error: Unknown player" );
      else if ( IsPlayerInAnyVehicle( plr ) )
      {
         new id, Float:hp;
         id = GetPlayerVehicleID( plr );
         GetVehicleHealth( GetPlayerVehicleID( plr ), hp );
         hp = ( hp / 1000.00 ) * 1000;

         format( szMsg, sizeof( szMsg ), "ID:[ %d ] Health:[ %.0f% ] Owner:[ %s ]  Price:[ $%d ]", id, hp, VehicleInfo[ id ][ Propietario ], VehicleInfo[ id ][ Precio ] );
         SendClientMessage( playerid, COLOR_GREEN, szMsg );
        }
      else
      {
         format( szMsg, sizeof( szMsg ), "%s is currently on foot.", gPlayers[ plr ] );
         SendClientMessage( playerid, COLOR_GREEN, szMsg );
      }
      return 1;
      }
                                 else if ( strcmp( cmd, "!gotov", true ) == 0 )
   {
         tmp = strtok( cmdtext, idx );
      if ( !IsLoggedIn( playerid ) ) Mensaje( playerid, COLOR_RED, "Login first." );
      else if ( !strlen( tmp ) ) Mensaje( playerid, COLOR_YELLOW, "write: !gotov [VehicleID]" );
      else if ( !IsVehiclePropietario( strval( tmp ), playerid ) ) Mensaje( playerid, COLOR_RED, "Error: Not is you vehicle." );
      else
      {
       PutDirectlyInVehicle(playerid, strval( tmp ) );
       Mensaje(playerid,COLOR_RED,"You are travel inside of you vehicle");
      }
      return 1;
   }
//==========================================================================================
                     /* Add this publics */
public InfoAutoCerrado(playerid,vehicleid)
{
     if (strcmp(GetAutoCerrado(vehicleid), "on", true) == 0) {
              Mensaje(playerid, GREEN,"This vehicle is closed whit keys.");
              RemovePlayerFromVehicle(playerid);
              SetVehicleToRespawn(vehicleid);
              }
   return 1;
}
//==============================================================================
public AutoCerrado(playerid,vehicleid)
{
         Mensaje(playerid, GREEN,"The vehicle now is closed.");
        SetAutoCerrado(vehicleid,"on");
}
//==============================================================================
public AutoAbierto(playerid,vehicleid)
{
Mensaje(playerid, GREEN,"The vehicle now is open.");
        SetAutoCerrado(vehicleid,"off");
        }
//==============================================================================
public GetAutoCerrado(vehicleid)
{
   new lock[256]; lock = dini_Get("/Autos/cerrado.ini",IntToStr(vehicleid));
   return lock;
}
//==============================================================================
public SetAutoCerrado(vehicleid,lock[])
{
   dini_Set("/Autos/cerrado.ini",IntToStr(vehicleid),lock);
}
//==============================================================================
public GetVehiclePropietario( vehicleid )
{
   return VehicleInfo[ vehicleid ][ Propietario ];
}
//==============================================================================
public GetCostoAuto( vehicleid )
{
   return VehicleInfo[ vehicleid ][ Precio ];
}
//==============================================================================
public SiEstaEnVenta( vehid )
{
   return ( strcmp( VehicleInfo[ vehid ][ Propietario ], "Automotora Sunshine Ltda.", true ) == 0 ) ? true : false;
}
//==============================================================================
public IsVehiclePropietario( vehid, plr )
{
   return ( strcmp( VehicleInfo[ vehid ][ Propietario ], gPlayers[ plr ], true ) == 0 ) ? true : false;
}
//==============================================================================
public SiExiste( vehid )
{
   return ( vehid > ServerInfo[ 0 ][ MaxVehicles ] ) ? false : true;
}
//==============================================================================
public CargarAutos()
{
   new XU, i;
   if ( !dini_Exists( "/Autos/autos.ini" ) ) return -1;
   new data[ 7 ][ 256 ];
   for ( XU = 1; XU <= 250; XU++ )
   {
      new pos[ 256 ], fm[ 6 ];
      format( fm, sizeof( fm ), "%d", XU );
      pos = dini_Get( "/Autos/autos.ini", fm );
      if ( strlen( pos ) )
      {
         i++;
         split( pos, data, ' ' );
         AddStaticVehicle( strval( data[ 0 ] ), floatstr( data[ 1 ] ), floatstr( data[ 2 ] ), floatstr( data[ 3 ] ), floatstr( data[ 4 ] ), strval( data[ 5 ] ), strval( data[ 6 ] ) );

         new nombre[32], propietario[256], precio;
         nombre = "";

         VehicleInfo[ i ][ Id ] = i;
         VehicleInfo[ i ][ Nombre ] = nombre;

         format( file, sizeof( file ), "/Autos/propietario.ini", "propietario" );
         propietario = dini_Get( file, IntToStr( i ) );
         VehicleInfo[ i ][ Propietario ] = propietario;

         format( file, sizeof( file ), "/Autos/precio.ini", "propietario" );
         precio = dini_Int( file, IntToStr( i ) );
         VehicleInfo[ i ][ Precio ] = precio;
      }
   }
   ServerInfo[ 0 ][ MaxVehicles ] = i;
   printf( " >> Cars added to server (%d)", i );
   return asp;
}

public Mensaje(playerid, color, text[])
   {
   new Msn[256];
   format(Msn, 256, "Private Message >> %s", text);
   SendClientMessage(playerid, color, Msn);
   return 1;
   }

//==============================================================================
//==============================================================================

                         /*added and define this*/
                         
new VehicleInfo[ 200 ][ vInfo ];
new ServerInfo[ 1 ][ sInfo ] ;
new asp = 0;


#define AUTOSPROPIETARIO_FILE  "/Autos/propietario.ini"
#define ROJO         0xAA3333AA
#define AMARILLO      0xFFFF00AA

 enum vInfo
{
   Id,
   Nombre[32],
   Propietario[256],
   Precio
}


// DO YOU LIKE MY SYSTEM AND COMMANDS?? COMMENT NOW!!
[/pawn]
Download and put this in you folder scriptfiles
http://depositfiles.com/files/5xwdt1s3w















PM TO SUPPORT
Like It :D Nice Work Keep It UP

3
ShowRoom (pawn) / Re: New Rob bank Command
« on: November 29, 2013, 01:47:59 am »

[pawn]new Maletin[MAX_PLAYERS];[/pawn]

[pawn]Put this in the public OnPlayerDisconnect(playerid, reason)

Maletin[playerid] = 0;

Put this in public OnPlayerSpawn(playerid,classid,teamid)
Maletin[playerid] = 0;[/pawn]

[pawn]
                  else if (strcmp(cmd, "robbank", true) == 0) {
{
           tmp = strtok(cmdtext, idx);
new szMsg[256], plr;

      if(Maletin[playerid] == 1) {

        SendClientMessage(playerid,0xAA3333AA,"You've robbed the bank! You can not steal it again!");
}
else if(!NeedPlayerInArea(playerid,-945.0223,-938.2779,-346.0285,-341.7365)) SendClientMessage(playerid, GREEN,"[Error] - You must be in the bank vault to steal it!");
else {
    GameTextForPlayerBottom(playerid,"~y~ >>>>");
    TogglePlayerControllable(playerid,0);
   SetTimer("roboenprogreso", 9000, false);
    SendClientMessage(playerid, COLOR_YELLOW,"Right now you're robbing the bank");
   IncPlayerHandCash(playerid,400);
    SetWantedLevel(playerid,6);
         format( szMsg, sizeof( szMsg ), "%s is robbing the bank, the police has been informed", gPlayers[ playerid ], gPlayers[ plr ], cmdtext[ strlen( tmp ) +8 ] );
         SendClientMessageToAll( COLOR_YELLOW, szMsg );
    SetPlayerMarker(playerid,15);
   SetPlayerSkin(playerid,0);
   SetPlayerSkin(playerid,129);
   ToggleGreenScanlinesForPlayer(playerid,1);
   ToggleWidescreenForPlayer(playerid,1);
   Maletin[playerid] = 1;
      }
  }

      return 1;
   }
[/pawn]

Public and stock

[pawn]//==============================================================================
stock NeedPlayerInArea(playerid,Float:MinX,Float:MaxX,Float:MinY,Float:MaxY)
{
      new Float:x,Float:y,Float:z;
       GetPlayerPos(playerid, x, y, z);
       if(x >= MinX && x <= MaxX && y >= MinY && y <= MaxY) return 1;
       else return 0;
      return 1;
}
//==============================================================================
public roboenprogreso() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(Maletin == 1) {
           SendClientMessage(i,COLOR_YELLOW,"You have been seen by security cameras, Escape immediately!");
           TogglePlayerControllable(i,1);
           ToggleGreenScanlinesForPlayer(i,0);
           ToggleWidescreenForPlayer(i,0);
      }
  }
      }
}
//==============================================================================
[/pawn]


Photos






You can not rob the bank two times in a row unless you die or disconnect



Do you like this command??


Thanks For This I luv it keep it up

4
ShowRoom (pawn) / Re: My DeathMatch from 0, now in english!
« on: November 29, 2013, 01:47:15 am »
Hello again,
on this occasion I come to my server bring death-match,
But this time in English, by the way ... Sorry for my bad English ...

Contain:

System properties:
! buyprop
! sellprop
! shareprop
! goprop


Car System:

! gotov
! buycar
! sellcar
! openv
! closev
! repair (only in the Pay N Spray)

Contains Anti-Nickname

If the player enters the server using strange symbols
be kicked from the server ...


Contains anti armor and life
If the hack used ugador life and be kicked exceeds 100
If you use hack armor and be kicked exceeds 99 ..

Contains bank system
! deposit
! withdraw

Includes registration system gups but modified to not believe a single account with the same name and set up ..

/ c register
/ c login
/ c exit

Contains Admin Commands
/ c goto
/ c setmon
/ c RESETMON
/ c ban
/ c unban
/ c Waterlevel
/ c speed
/ c money
/ c gravity
/ c get
/ c healall
/ c say
/ c
Contains skin buying and saving

/ c buyskin
/ c skin
(purchased in Store North Point Mall Gash)


Contains over 100 skins to be chosen to play

Add in console when player enters and exits a vehicle
When given the spawn
When disconnected
when he dies
When you register
When logs ....



Well I hope you like my server as I translate some work cost ....

Note:
PUBLICS FOLDERS AND REMAINED IN SPANISH
Just change language commands ....



Thank does not cost much, and I look forward to continue creating gamemodes and commands ....




http://www.putlocker.com/file/6BF6F9EF349E58EF


or download in the new MEGAUPLOAD

https://mega.co.nz/#!Pt4UkRYa!MhsYOTWoo_sPJvGpnWEuFyYtzBBPrDQMNhPI_KSIorE
Really Nice Work Keep It Up (y)

5
ShowRoom (pawn) / Re: Votekick, Command (is the one of a kind in vcmp)
« on: November 29, 2013, 01:44:05 am »
[pawn]new Xp[256], VoteKick[MAX_PLAYERS];
new file[ 128 ];[/pawn]



[pawn]                        else if (strcmp(cmd, "!votekick", true) == 0) {
            tmp = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if (!strlen(tmp)) SendClientMessage(playerid, 0x333AFFF,"Write: !votekick <name/id>");
        else
        {
                        if(VoteKick[playerid] == 1)
            {
   SendClientMessage(playerid,0xAA3333AA,"You already Vote");
}
                        if(VoteKick[playerid] == 0) {

          format( szMsg, sizeof( szMsg ), "Player [%s] calls votekick for  [%s] ",gPlayers[playerid],gPlayers[plr]);
                  SendClientMessageToAll(0x333AFFF, szMsg );
                      format( szMsg, sizeof( szMsg ), "For Vote Write !votekick %s",gPlayers[plr]);
                  SendClientMessageToAll(0x333AFFF, szMsg );
                  DarVoteKick(plr,1);
                     SetTimer( "Votando", 120000,false);
                  VoteKick[playerid] = 1;
          format( szMsg, sizeof( szMsg ), "VoteKick [%s], [%s] ",gPlayers[plr],VoteKickLevel(ObtenerVoteKick(plr)));
                  SendClientMessageToAll(0x333AFFF, szMsg );
                  }
                                               if (ObtenerVoteKick(plr) == 5)
           {
           Kick(plr);
                format( szMsg, sizeof( szMsg ), "Player [%s] Is kicked Reason [VoteKick]",gPlayers[plr]);
                  SendClientMessageToAll(0xAA3333FF, szMsg );
                  SetTimer( "VotoBorrado", 5000,false);
        KillTimer(120000);
                 
           }
           }
                  return 1;
                  }[/pawn]

[pawn]//==============================================================================
public VotoBorrado() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(VoteKick == 1) {
SendClientMessage(i,0x0FCD18FF,"Now You Cant Vote Again");
VoteKick = 0;
}
}
}
}
//==============================================================================
public Votando() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
SendClientMessage(i,0x0FCD18FF,"VoteKick is canceled 2 minutes passed");
QuitaVoteKick(i);
VoteKick = 0;
}
}
}
//==============================================================================
public ObtenerVoteKick(playerid)
{
    format(Xp,256, REGISTROS, gPlayers[playerid]); //Please change "REGISTROS" and put your folder name of registers
   new vote; vote = dini_Int(Xp,"VoteKick");
   return vote;
}
public DarVoteKick( playerid, Amount )
{
   format( file, sizeof( file ), REGISTROS, gPlayers[ playerid ] ); //Please change "REGISTROS" and put your folder name of registers
   new votekick; votekick = dini_Int( file, "VoteKick" );
   dini_IntSet( file, "VoteKick", votekick +Amount);
}
public QuitaVoteKick(playerid)
{
    format(Xp,256, REGISTROS, gPlayers[playerid]); //Please change "REGISTROS" and put your folder name of registers
   dini_Unset(Xp,"VoteKick");
}
//==============================================================================
public VoteKickLevel(level)
{
   new lvl[256];
    if (level == 1) lvl = "1";
   if (level == 2) lvl = "2";
    if (level == 3) lvl = "3";
    if (level == 4) lvl = "4";
   else if (level == 5) lvl = "5";
   return lvl;
}
//================================================
[/pawn]

This Command is for make a vote and if the player have 5 vote es automatic kicked




Nice Work Man I Appreciate Your Work

Pages: [1]