All can help-- Sumo random vehicles.
#1

Hello,
I have created an sumo map but i wanna a player to have a vehicle if is type: /sumo
I wanna a script with random vehicles to put player in them if is use: /sumo
My sumo command here:
Код:
              if(strcmp(cmdtext, "/sumo", true) == 0)
              {
				{if(State!=PLAYER_STATE_DRIVER)
		 		{SetPlayerPos(playerid,-1108.373901,-994.648681,169.191757);}
				else if(IsPlayerInVehicle(playerid, cartype) == 1)
				{SetVehiclePos(cartype,-1108.373901,-994.648681,169.191757);
				SetVehicleZAngle(cartype,101.732429);}
				else
				{SetPlayerPos(playerid,-1108.373901,-994.648681,169.191757);}
		 		SendClientMessage(playerid, 0x33AA33AA,"Welcome in (/Sumo)!.");//I want vehicles not hust the player
				 }

		        return 1;
             }
PLZ help me all can help!
Thanks!
Reply
#2

Anyone to help?
Reply
#3

Alright first of all, you'll need to create some vehicle around the sumo map. then create some variables like this:
pawn Код:
//On the top of your script
//if you have 6 cars
new IsCar0Used;
new IsCar1Used;
new IsCar2Used;
new IsCar3Used;
new IsCar4Used;
new IsCar5Used;
Then...
pawn Код:
//Under OnGameModeInit()
IsCar0Used = 0;
IsCar1Used = 0;
IsCar2Used = 0;
IsCar3Used = 0;
IsCar4Used = 0;
IsCar5Used = 0;
and now the in the /sumo command
pawn Код:
//Follow this:
if(IsCar0Used == 0)
{
    PutPlayerInVehicle(playerid, 0, 0);
    SendClientMessage(playerid, 0x33AA33AA,"Welcome in (/Sumo)!.");
    IsCar0Used = 1;
}
//Do the same thing with the other vehicles :D
If u need more explanation tell me.
Reply
#4

i want vehicles but not in map
vehicles like this:
PutPlayerInVehicle(playerid,bla bla);
Thanks
Reply
#5

Alright maybe this will help
pawn Код:
//In your /sumo command add this after teleporting the player
new PlayerSumoCar[MAX_PLAYERS], PlayerAngle;
GetPlayerFacingAngel(playerid, PlayerAngle);
PlayerSumoCar = CreateVehicle(415, -1108.373901,-994.648681,169.191757, PlayerAngle, 0, 1, 60);
PutPlayerInVehicle(playerid, PlayerSumoCar, 0);
Reply
#6

OK i test it!
Reply
#7

i have this code
Код:
              if(strcmp(cmdtext, "/sumo", true) == 0)
              {
				LastSkin[playerid] = GetPlayerSkin(playerid);
                inminigame[playerid] = 1;
				{if(State!=PLAYER_STATE_DRIVER)
		 		{SetPlayerPos(playerid,-1108.373901,-994.648681,169.191757);}
				else if(IsPlayerInVehicle(playerid, cartype) == 1)
				{SetVehiclePos(cartype,-1108.373901,-994.648681,169.191757);
				SetVehicleZAngle(cartype,101.732429);}
				else
				{SetPlayerPos(playerid,-1108.373901,-994.648681,169.191757);}
				GetPlayerName(playerid, pName, 30);
 	  			format(string, 280, "[MiniGame]: %s has been joined to Vehicles Sumo: (/sumo).", pName);
  	  			SendClientMessageToAll(COLOR_YELLOW, string);
		 		SendClientMessage(playerid, 0x33AA33AA,"Welcome in vehicles Sumo mini game.");
			 		//In your /sumo command add this after teleporting the player
				new Float:Angle;
				GetPlayerFacingAngle(playerid,Angle);
				sumocar = CreateVehicle(415, -1108.373901,-994.648681,169.191757, 0, 1, 60);
				PutPlayerInVehicle(playerid, sumocar, 0);
				 }

		        return 1;
				}
and i get these two errors
Код:
C:\Users\Aldion\Desktop\ADC Clan Server[v1.0.50]\gamemodes\Drift-Stunts-Freeroam.pwn(2376) : warning 202: number of arguments does not match definition
C:\Users\Admin\Desktop\Server[v1.0.50]\gamemodes\Drift-Stunts-Freeroam.pwn(2376) : error 033: array must be indexed (variable "sumocar")
C:\Users\Admin\Desktop\Server[v1.0.50]\gamemodes\Drift-Stunts-Freeroam.pwn(2377) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Please i need to fix it!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)