Author Topic: NOW!! You can't rob the players in the server, like cops and robers!  (Read 7329 times)

0 Members and 2 Guests 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
[pawn]new Wallet[MAX_PLAYERS];[/pawn]

 "Gups or Fc version"

 [pawn]              else if(strcmp(cmd,"rob",true) == 0) {
{
     tmp = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if(Wallet[plr] == 1) {

        SendClientMessage(playerid,0xAA3333AA,"You not cant rob the same player again!");
}
       if ( !strlen( tmp ) ) SendClientMessage( playerid, 0xFFFF00AA, "Write: /c rob [Nick/ID]" );
       else if ( plr == INACTIVE_PLAYER_ID ) SendClientMessage( playerid, 0xAA3333AA, "Error: Unknown Player" );
   else{
   if(Wallet[plr] == 0) {
    new Float:XR, Float:YR, Float:ZR;
   GetPlayerPos(playerid,XR,YR,ZR);
   if(PlayerToPoint(3.0,plr,XR,YR,ZR)) {
       format( szMsg, sizeof( szMsg ), "%s steal the wallet of %s", gPlayers[playerid],gPlayers[plr]);
        SendClientMessageToAll( 0xFFFF00AA, szMsg );
        IncPlayerHandCash(playerid,200);
        DecPlayerHandCash(plr,200);
        Wallet[plr] = 1;
       SetPlayerMarker(playerid,15);
       }
      else SendClientMessage(playerid,0xAA3333AA,"Need to be closer for rob");
      }
  }
}

      return 1;
}[/pawn]

[pawn]public OnPlayerDeath(playerid, killerid, reason, bodypart)
{

Wallet[playerid] = 0;[/pawn]

[pawn]public OnPlayerDisconnect(playerid, reason)
{

Wallet[playerid] = 0;[/pawn]

All scripts version

[pawn]               else if(strcmp(cmd,"rob",true) == 0) {
{
     tmp = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if(Wallet[plr] == 1) {

        SendClientMessage(playerid,0xAA3333AA,"You not cant rob the same player again!");
}
       if ( !strlen( tmp ) ) SendClientMessage( playerid, 0xFFFF00AA, "Write: /c rob [Nick/ID]" );
   else{
   if(Wallet[plr] == 0) {
    new Float:XR, Float:YR, Float:ZR;
   GetPlayerPos(playerid,XR,YR,ZR);
   if(PlayerToPoint(3.0,plr,XR,YR,ZR)){
   if ( GetPlayerMoney( plr ) > 199 ) {
       format( szMsg, sizeof( szMsg ), "%s steal the wallet of %s", gPlayers[playerid],gPlayers[plr]);
        SendClientMessageToAll( 0xFFFF00AA, szMsg );
       format( szMsg, sizeof( szMsg ),"You steal $ 200 of the player %s",gPlayers[plr]);
        SendClientMessage(playerid, 0xFFFF00AA, szMsg );
        SetPlayerMoney(plr,GetPlayerMoney(plr) - 200);
        SetPlayerMoney(playerid,GetPlayerMoney(playerid) + 200);
        Wallet[plr] = 1;
        }
        if ( GetPlayerMoney( plr ) < 199 ){
      SendClientMessage(playerid,0xFFFF00AA,"This player not have money to rob");
       SetPlayerMarker(playerid,15);
       Wallet[plr] = 0;
       }
       }
      else SendClientMessage(playerid,0xAA3333AA,"Need to be closer for rob");
      }
  }
}

      return 1;
}[/pawn]
« Last Edit: March 21, 2013, 06:33:32 pm by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline Tomiijaja

  • Street Thug
  • *
  • Posts: 24
    • View Profile
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #1 on: March 18, 2013, 03:56:34 pm »
Na lo robaste, no eres capaz de hacer tu propio comando, solo le robas al script de madara (Warchiefs)

Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #2 on: March 18, 2013, 03:57:35 pm »
Sorry alejandro. You may edit and add "this is for GUPS"
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #3 on: March 19, 2013, 04:50:38 pm »
Sorry alejandro. You may edit and add "this is for GUPS"

if you are stup_ _ ....
and not see ...
if you not have IncPlayerHandCash or DecPlayerHandCash
is you problem, but have two system
SetPlayerMoney -200
and SetPlayerMoney + 200
so...
you only need remove


IncPlayerHandCash and DecPlayerHandCash

Note: I have a server from 0
Only i put the register system of gups, but have my own system of
IncPlayerHandCash and DecPlayerHandCash and bank System, if you need my system only talk whit me
« Last Edit: March 19, 2013, 04:52:18 pm by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline .ElBoyz

  • Street Thug
  • *
  • Posts: 15
  • ¿ What's up doc ?
    • View Profile
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #4 on: March 19, 2013, 09:00:29 pm »
Na lo robaste, no eres capaz de hacer tu propio comando, solo le robas al script de madara (Warchiefs)

TomiJaja , EN Ningun warchiefs sale comando "rob" , al parecer Tu lo unico que sabes es , Cojer 1 comando y traducirlo y cojerlo para ti , Repeta Lo rango.

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #5 on: March 19, 2013, 09:53:08 pm »
What happens if the victim player doesn't have 200$ ? It will still take + give that amount.

+ Why you used both functions that increase/decrease the money of a player ?

Quote
Code: [Select]
IncPlayerHandCash(playerid,200);
        DecPlayerHandCash(plr,200);
SetPlayerMoney(plr,GetPlayerMoney(plr) - 200);
SetPlayerMoney(playerid,GetPlayerMoney(playerid) + 200);

This couple of lines will take $200 from the victim once (at the second line: "DecPlayerHandCash(plr,200);") and will take again this amoun (200 $) because you have used this line: "SetPlayerMoney(plr,- 200);" . And the robber will increase $400 not $200 by robbing that player.

+ just $200 will be saved in the database, the rest of $200 will be just in the HUD, so just $200 will be usable.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline dynavolt71

  • Crime Boss
  • ****
  • Posts: 371
    • View Profile
    • My Blog
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #6 on: March 20, 2013, 01:49:33 pm »
Who stu*** now ?
[PAWNO]Fix Error " Failed to set data for "" " - http://forum.vicecitymultiplayer.com/index.php?topic=5743.0



:'(

Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #7 on: March 20, 2013, 03:53:45 pm »
What happens if the victim player doesn't have 200$ ? It will still take + give that amount.

+ Why you used both functions that increase/decrease the money of a player ?

Quote
Code: [Select]
IncPlayerHandCash(playerid,200);
        DecPlayerHandCash(plr,200);
SetPlayerMoney(plr,GetPlayerMoney(plr) - 200);
SetPlayerMoney(playerid,GetPlayerMoney(playerid) + 200);

This couple of lines will take $200 from the victim once (at the second line: "DecPlayerHandCash(plr,200);") and will take again this amoun (200 $) because you have used this line: "SetPlayerMoney(plr,- 200);" . And the robber will increase $400 not $200 by robbing that player.

+ just $200 will be saved in the database, the rest of $200 will be just in the HUD, so just $200 will be usable.


Because not all players have DecPlayerHandCash And IncPlayerHandCash, so this reason is "not have public" Deleted inc and dec :p
and i posted my commands but always update and keep the latest update.....
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline sseebbyy

  • VC:MP Veteran
  • *****
  • Posts: 774
  • Immortal VC:MP Player
    • View Profile
    • Zombie Invasion => Server Forum [DEAD PROJECT]
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #8 on: March 20, 2013, 05:22:40 pm »
Because not all players have DecPlayerHandCash And IncPlayerHandCash, so this reason is "not have public" Deleted inc and dec :p
and i posted my commands but always update and keep the latest update.....

I'm talking about players that have both functions implemented. (DecPlayerHandCash & IncPlayerHandCash)
I suggest you to give more details in the first post, or to make 2 versions: one for GUPS and one for standard scripts. (detailed too)

+

What happens if the victim player doesn't have 200$ ? It will still take + give that amount.

Quote
Painful/Noob scripters acts like: I Am The Best Scripter Because I Announce My Releases With Big Font Size Without Giving Too Much Info' In The Hope They All Will Download And Check It. I Ignore Bad Replies, Replies That I Could Learn From, And Replies With So Much Text.



Offline aledark24

  • Made Man
  • ***
  • Posts: 206
  • I am a scripter and you have celous of me....so you crashed my servers
    • View Profile
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #9 on: March 21, 2013, 06:26:21 pm »
Because not all players have DecPlayerHandCash And IncPlayerHandCash, so this reason is "not have public" Deleted inc and dec :p
and i posted my commands but always update and keep the latest update.....

I'm talking about players that have both functions implemented. (DecPlayerHandCash & IncPlayerHandCash)
I suggest you to give more details in the first post, or to make 2 versions: one for GUPS and one for standard scripts. (detailed too)

+

What happens if the victim player doesn't have 200$ ? It will still take + give that amount.



ok ok


[pawn]               else if(strcmp(cmd,"rob",true) == 0) {
{
     tmp = strtok( cmdtext, idx ), plr = FindPlayerIDFromString( tmp );
      if(Wallet[plr] == 1) {

        SendClientMessage(playerid,0xAA3333AA,"You not cant rob the same player again!");
}
       if ( !strlen( tmp ) ) SendClientMessage( playerid, 0xFFFF00AA, "Write: /c rob [Nick/ID]" );
   else{
   if(Wallet[plr] == 0) {
    new Float:XR, Float:YR, Float:ZR;
   GetPlayerPos(playerid,XR,YR,ZR);
   if(PlayerToPoint(3.0,plr,XR,YR,ZR)){
   if ( GetPlayerMoney( plr ) > 199 ) {
       format( szMsg, sizeof( szMsg ), "%s steal the wallet of %s", gPlayers[playerid],gPlayers[plr]);
        SendClientMessageToAll( 0xFFFF00AA, szMsg );
       format( szMsg, sizeof( szMsg ),"You steal $ 200 of the player %s",gPlayers[plr]);
        SendClientMessage(playerid, 0xFFFF00AA, szMsg );
        SetPlayerMoney(plr,GetPlayerMoney(plr) - 200);
        SetPlayerMoney(playerid,GetPlayerMoney(playerid) + 200);
        Wallet[plr] = 1;
        }
        if ( GetPlayerMoney( plr ) < 199 ){
      SendClientMessage(playerid,0xFFFF00AA,"This player not have money to rob");
       SetPlayerMarker(playerid,15);
       Wallet[plr] = 0;
       }
       }
      else SendClientMessage(playerid,0xAA3333AA,"Need to be closer for rob");
      }
  }
}

      return 1;
}[/pawn]

is better now sseebbyy??
« Last Edit: March 21, 2013, 06:32:22 pm by aledark24 »
I am a great scripter and you are celous of my works
.....

Vice City Life Multiplayer By Saint

Offline .ElBoyz

  • Street Thug
  • *
  • Posts: 15
  • ¿ What's up doc ?
    • View Profile
Re: NOW!! You can't rob the players in the server, like cops and robers!
« Reply #10 on: March 23, 2013, 06:43:20 am »