Author Topic: [new command] rob in the street xD  (Read 5303 times)

0 Members and 1 Guest are viewing this topic.

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
[new command] rob in the street xD
« on: December 26, 2012, 08:03:59 pm »
[pawn]new Billetera[MAX_PLAYERS];[/pawn]

[pawn]     else if (strcmp(cmd, "rob", true) == 0) {
      tmp = strtok( cmdtext, idx ); new plr = FindPlayerIDFromString( tmp );
            if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c rob [Nick/ID]" );
      else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
      else if ( !IsPlayerSpawned( plr ) ) SendClientMessagef( playerid, COLOR_GREEN, "Error: %s does not spawned!", gPlayers[ plr ] );
       else if(!NeedPlayerInArea(playerid,-1120.6895,-809.5638,-693.6281,-137.1244)) SendClientMessage(playerid, GREEN,"[Error] - You can only steal in an area near the bank");
       else {
       
              new Float:RX, Float:RY, Float:RZ, szMsg[256];
                  GetPlayerPos(playerid,RX,RY,RZ);
                  if(PlayerToPoint(3.0,plr,RX,RY,RZ))
                        format( szMsg, sizeof( szMsg ), "%s is stealing the wallet of %s", gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll( COLOR_RED, szMsg );
              SetTimer("robando", 7000, false);
                  TogglePlayerControllable(playerid,0);
                  IncPlayerHandCash(playerid,150);
              DecPlayerHandCash(plr,150);
             Billetera[playerid] = 1;
              SetPlayerMarker(playerid,15);
         }
      return 1;
   }[/pawn]

HEM is not finish yet because contain one bug if the player "plr" not is in the area = disccount money xD
 

Stock AND public

[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 PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
    {
        return 1;
    }
    return 0;
}
//==============================================================================
public robando() {
    for(new i = 0; i < MAX_PLAYERS; i++) {
        if(IsPlayerConnected(i)) {
       if(Billetera == 0) {
       }
       if(Billetera == 1) {
           SendClientMessage(i,COLOR_YELLOW,"You have been seen, Escape immediately!");
           TogglePlayerControllable(i,1);

  }
      }
      }
}
//==============================================================================[/pawn]

Only rob in this area


« Last Edit: December 26, 2012, 08:06:26 pm by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [new command] rob in the street xD
« Reply #1 on: December 26, 2012, 11:07:42 pm »
man i am a fan of you but plz give me a pawno code means fix this that it can works in gups too
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: [new command] rob in the street xD
« Reply #2 on: December 27, 2012, 12:25:16 am »
wtf?is working in gups i compile in gups so what do you mean?
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [new command] rob in the street xD
« Reply #3 on: December 27, 2012, 11:49:01 am »
man i send you my script plz dont give that to anyone just keep in your computer if you make a system cool plz test in gups means edited gups
thanks
i send you script via PM
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [new command] rob in the street xD
« Reply #4 on: December 27, 2012, 02:56:45 pm »
it works in gups with this code
[pawn]          else if (strcmp(cmd, "rob", true) == 0) {
      tmp = strtok( cmdtext, idx ); new plr = FindPlayerIDFromString( tmp );
            if ( !IsLoggedIn( playerid ) ) SendClientMessage( playerid, COLOR_RED, "Please log-in to your account." );
      else if ( !strlen( tmp ) ) SendClientMessage( playerid, COLOR_GREEN, "USAGE: /c rob [Nick/ID]" );
      else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, COLOR_RED, "Error: Unknown player" );
             else {
       
              new Float:RX, Float:RY, Float:RZ, szMsg[256];
                  GetPlayerPos(playerid,RX,RY,RZ);
                  if(PlayerToPoint(3.0,plr,RX,RY,RZ))
                        format( szMsg, sizeof( szMsg ), "%s is stealing the wallet of %s", gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll( COLOR_RED, szMsg );
              SetTimer("robando", 7000, false);
                  TogglePlayerControllable(playerid,0);
                  IncPlayerHandCash(playerid,150);
              DecPlayerHandCash(plr,150);
             Billetera[playerid] = 1;
              SetPlayerMarker(playerid,15);
         }
  return 1;
   }[/pawn]
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline · KaTaNNa ·

  • Street Thug
  • *
  • Posts: 12
  • It's easy to talk about difficult mi.Lo is be me .
    • View Profile
Re: [new command] rob in the street xD
« Reply #5 on: December 27, 2012, 05:31:19 pm »
Necesitas prohibir el robo a cierta distancia :

[pawn]new Float:RX, Float:RY, Float:RZ;
   GetPlayerPos(playerid,RX,RY,RZ);
   if(PlayerToPoint(3.0,plr,RX,RY,RZ)) {  // si el "player" esta cerca de "plr".Robo aceptado!
       format( szMsg, sizeof( szMsg ), "%s is stealing the wallet of %s", gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll( COLOR_RED, szMsg );
              SetTimer("robando", 7000, false);
      TogglePlayerControllable(playerid,0);
      IncPlayerHandCash(playerid,150);
              DecPlayerHandCash(plr,150);
             Billetera[playerid] = 1;
              SetPlayerMarker(playerid,15);
              }
      else {
      SendClientMessage(playerid,COLOR_RED,"Necesitas estar cerca de algun jugador para poder Robarle!"); // si el "player" esta lejos de "plr" . Robo denegado :(!
      }[/pawn]
If you think you do dificil.No back ... go ahead and face it! ;D

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: [new command] rob in the street xD
« Reply #6 on: December 28, 2012, 03:23:27 am »
el asunto es k queria hacerlo solo cerca del banco por eso no lo hize de esa manera
 No kiero en todo el servidor!
Necesitas prohibir el robo a cierta distancia :

[pawn]new Float:RX, Float:RY, Float:RZ;
   GetPlayerPos(playerid,RX,RY,RZ);
   if(PlayerToPoint(3.0,plr,RX,RY,RZ)) {  // si el "player" esta cerca de "plr".Robo aceptado!
       format( szMsg, sizeof( szMsg ), "%s is stealing the wallet of %s", gPlayers[playerid],gPlayers[plr]);
         SendClientMessageToAll( COLOR_RED, szMsg );
              SetTimer("robando", 7000, false);
      TogglePlayerControllable(playerid,0);
      IncPlayerHandCash(playerid,150);
              DecPlayerHandCash(plr,150);
             Billetera[playerid] = 1;
              SetPlayerMarker(playerid,15);
              }
      else {
      SendClientMessage(playerid,COLOR_RED,"Necesitas estar cerca de algun jugador para poder Robarle!"); // si el "player" esta lejos de "plr" . Robo denegado :(!
      }[/pawn]
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline NeskWriter

  • Crime Boss
  • ****
  • Posts: 355
    • View Profile
Re: [new command] rob in the street xD
« Reply #7 on: December 28, 2012, 03:07:05 pm »
nice map


-Funniest quotes-

Quote from: asad3man
i cant able to understand

Offline mrockxkingbutt

  • Crime Boss
  • ****
  • Posts: 373
  • I AM Best Scripter And You Are Not :P
    • View Profile
Re: [new command] rob in the street xD
« Reply #8 on: December 29, 2012, 11:55:50 am »
man this help to stop yourself not that player
My Servers Showroom!
www.jimxvcmpscripts.createaforum.com/

Quote from:  rohanaj60
i m a great script Editor

Rofl! lmao lol

Offline JaVeD

  • Street Thug
  • *
  • Posts: 46
  • Want scripts? Pm me now! Just for $
    • View Profile
    • Free Host -> Clicky
Re: [new command] rob in the street xD
« Reply #9 on: February 11, 2013, 06:46:36 am »
IF some one if robbed then we can rob him again and again ? please put this command if player is robbed in 1 hours we cant rob again this player it show the message " This player is robbed recently "
SA:MP Server: 5.231.49.21:7777
Website: www.nse-server.com