Command for creating vehicles
#1

please, can you give me command which wil lcreate vehicle around me, around 10-15 vehicles...

i really dont know how to create
Reply
#2

So, you want to create 15 vehicles near you, by typing a single command ?
Reply
#3

this is not easy?

i only ask...

but i try some command to create vehicles near me, but in range of 50
Reply
#4

Ok, wait. I'll create you 10 vehicles in a circle.
Reply
#5

Ok. So, i made it only for 8 cars per command. The command is /ccc or /createcirclecars.

This is the filterscript or the command:
PHP Code:
#include <a_samp>
public OnPlayerCommandText(playeridcmdtext[])
{
    if(!
strcmp(cmdtext,"/createcirclecars",true) || !strcmp(cmdtext,"/ccc",true))
    {
        new 
numb 8;
        new 
Float:mypos[3],Float:hiscoord[3],Float:distance,Float:angle,Float:myangle;
        
GetPlayerFacingAngle(playerid,myangle);
        
GetPlayerPos(playerid,mypos[0],mypos[1],mypos[2]);
        static const 
cars[8] =
        {
            
411415429451// Speed cars
            
550559560562 // Tunned cars
        
};
        
angle 360.0 numb;
        
distance numb 1.2;
        new 
= -1;
        for(new 
0numbi++)
        {
            
j++;
            
hiscoord[0] = mypos[0] + distance floatcos(angle,degrees);
            
hiscoord[1] = mypos[1] + distance floatsin(angle,degrees);
            
            new 
Float:vehangle;
            if(!
|| == 4vehangle myangle;
            else if(
== || == 5vehangle myangle+90;
            else if(
== || == 6vehangle myangle+180;
            else 
vehangle myangle+270;
            new 
carid CreateVehicle(cars[random(sizeof(cars))], hiscoord[0], hiscoord[1], mypos[2], vehangle, -1, -1600);
            
LinkVehicleToInterior(caridGetPlayerInterior(playerid));
        }
        return 
1;
    }
    return 
0;

Here's the screenshot:


If you don't like, I can make you like the cars to be spawned in a line. Like race cars ...
Reply
#6

heh.... if you can make command to spawn car in line, but in ZCMD (CMD: "command")

because i need this comamnd for events and racing
Reply
#7

help

command for creating vehicles in line!?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)