Vice City Multiplayer

VC:MP 0.3 => mIRC/pawn Scripting => Topic started by: [Tkiller] on February 26, 2012, 07:58:42 am

Title: little problem ++++Click++++
Post by: [Tkiller] on February 26, 2012, 07:58:42 am
[pawn]   else if (strcmp(cmd, "!race", true) == 0)
   {
   tmp = strtok(cmdtext, idx);
      if (!strlen(tmp)) {
      SetPlayerPos(playerid,-1051.5901,321.7699,10.7553);
        ResetPlayerWeapons(playerid);
        PutPlayerInVehicle(playerid,100);
        PutPlayerInVehicle(playerid,101);
        PutPlayerInVehicle(playerid,102);
        PutPlayerInVehicle(playerid,103);
        SendClientMessageToAll(GREEN, "Wait 10 seconds for more players");
      format( szMsg, 128, "%s is now on racetrack, type !race for race with him",gPlayers[playerid]);
       SendClientMessageToAll( RED, szMsg );
       GameTextForAllBottom("~g~End ~g~On ~g~Malibu!");
      }
      return 1;
   }[/pawn]




I make a race command like this...
when player type race the automatically put in vehicle,but the problem is that players only put in first vehicles not others vehicles....
so what can id o for this...
and when they finish race,then other player type race so they wont go on racetrack they directly put in vehicle of where the race ends,not on racetrack....
Title: Re: little problem ++++Click++++
Post by: DilsonTB on February 26, 2012, 03:39:02 pm
In pawn this is a Problem, cuz when a player in already in vehicle PuttoAnotherVehicle wont work so try this:

[pawn]   else if (strcmp(cmd, "!race", true) == 0)
   {
   tmp = strtok(cmdtext, idx);
      if (!strlen(tmp)) {
   SetPlayerPos(playerid,-1051.5901,321.7699,10.7553,0,0); // And also you need to add ,0,0
        ResetPlayerWeapons(playerid);
        PutPlayerInVehicle(playerid,100);
        RemovePlayerFromVehicle(playerid);
        PutPlayerInVehicle(playerid,101);
        RemovePlayerFromVehicle(playerid);
        PutPlayerInVehicle(playerid,102);
        RemovePlayerFromVehicle(playerid);
        PutPlayerInVehicle(playerid,103);
        SendClientMessageToAll(GREEN, "Wait 10 seconds for more players");
      format( szMsg, 128, "%s is now on racetrack, type !race for race with him",gPlayers[playerid]);
       SendClientMessageToAll( RED, szMsg );
       GameTextForAllBottom("~g~End ~g~On ~g~Malibu!");
      }
      return 1;
   }[/pawn]

The other thing that i dont understand is: Why the player must enter to 3 vehicles before race?

 
Title: Re: little problem ++++Click++++
Post by: [Tkiller] on February 27, 2012, 07:40:50 am
Thanks so much.... :D