Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: mrockxkingbutt on December 10, 2012, 08:37:37 pm

Title: Robbing Player in Gups (Bug)
Post by: mrockxkingbutt on December 10, 2012, 08:37:37 pm
[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]
this is not rob other player this is rob yourself
Title: Re: how to add !rob playername
Post by: aledark24 on December 10, 2012, 10:58:54 pm
i need some basic cmds with some functions
!rob then type if you r near a player you can rob himlol understand
you not understand,make you own commands
the forum is for help not for give to you all commands
Title: Re: how to add !rob playername
Post by: NeskWriter on December 11, 2012, 09:17:35 am
All u need to learn here are string functions and playertopoint
Title: Re: how to add !rob playername
Post by: NeskWriter on December 11, 2012, 09:46:52 pm
i need some basic cmds with some functions
!rob then type if you r near a player you can rob himlol understand
you not understand,make you own commands
the forum is for help not for give to you all commands

I think is okay cuz he asked us for cmd in the right topic so.
Title: Re: how to add !rob playername
Post by: heekz.shadow on December 11, 2012, 10:22:52 pm
i need some basic cmds with some functions
!rob then type if you r near a player you can rob himlol understand
you not understand,make you own commands
the forum is for help not for give to you all commands

I think is okay cuz he asked us for cmd in the right topic so.

It's obvious that you do not understand why these forums were made. We are not here to script for others, we script at our own will for our own benefits, if others choose to help others, that's completly different. We are here to help, not to give away commands. He should try to do it himself and then post the script if he had any mistake.
Title: Re: how to add !rob playername
Post by: aledark24 on December 11, 2012, 10:26:58 pm
Ask for all commands?? I dont think so...
Neskwriter you give all commands
To mrockxkingbutt
i need some basic cmds with some functions
!rob then type if you r near a player you can rob himlol understand
you not understand,make you own commands
the forum is for help not for give to you all commands

I think is okay cuz he asked us for cmd in the right topic so.
Title: Re: how to add !rob playername
Post by: NeskWriter on December 13, 2012, 06:29:01 pm
Aledark what about to go to school?
Title: Re: how to add !rob playername
Post by: mrockxkingbutt on December 27, 2012, 06:43:53 pm
aledark is helping me making cmds
you r a great guy
Title: Re: how to add !rob playername
Post by: mrockxkingbutt on December 27, 2012, 08:17:01 pm
here is the AleDark24 rob cmd
[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]