Car respawn
#1

Hello my friends.
My problem;
With /a park command I'm getting the position of the car and the car explodes but is not respawn in the new position
Reply
#2

send code
Reply
#3

I haven’t a code. I want code from you
Reply
#4

You just said you have a problem and now you're saying you don't have a code?
Reply
#5

facepalm your post is almost encrypted, is that a request for a car spawner command?
Reply
#6

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
facepalm your post is almost encrypted, is that a request for a car spawner command?
use ": picard :" mate it works flawless ()

I think he wants a car spawner command.

i found this on Gooogle https://pastebin.com/f6b466ce0
Reply
#7

Quote:
Originally Posted by Xeon™
Посмотреть сообщение
use ": picard :" mate it works flawless ()

I think he wants a car spawner command.

i found this on Gooogle https://pastebin.com/f6b466ce0
Thanks my immortal enemy
i found one that supports names i think its made by luxorion very old but effective & efficient
PHP код:
new VehicleNames[212][] = {
{
"Landstalker"},{"Bravura"},{"Buffalo"},{"Linerunner"},{"Perrenial"},{"Sentinel"},{"Dumper"},
{
"Firetruck"},{"Trashmaster"},{"Stretch"},{"Manana"},{"Infernus"},{"Voodoo"},{"Pony"},{"Mule"},
{
"Cheetah"},{"Ambulance"},{"Leviathan"},{"Moonbeam"},{"Esperanto"},{"Taxi"},{"Washington"},
{
"Bobcat"},{"Mr Whoopee"},{"BF Injection"},{"Hunter"},{"Premier"},{"Enforcer"},{"Securicar"},
{
"Banshee"},{"Predator"},{"Bus"},{"Rhino"},{"Barracks"},{"Hotknife"},{"Trailer 1"},{"Previon"},
{
"Coach"},{"Cabbie"},{"Stallion"},{"Rumpo"},{"RC Bandit"},{"Romero"},{"Packer"},{"Monster"},
{
"Admiral"},{"Squalo"},{"Seasparrow"},{"Pizzaboy"},{"Tram"},{"Trailer 2"},{"Turismo"},
{
"Speeder"},{"Reefer"},{"Tropic"},{"Flatbed"},{"Yankee"},{"Caddy"},{"Solair"},{"Berkley's RC Van"},
{
"Skimmer"},{"PCJ-600"},{"Faggio"},{"Freeway"},{"RC Baron"},{"RC Raider"},{"Glendale"},{"Oceanic"},
{
"Sanchez"},{"Sparrow"},{"Patriot"},{"Quad"},{"Coastguard"},{"Dinghy"},{"Hermes"},{"Sabre"},
{
"Rustler"},{"ZR-350"},{"Walton"},{"Regina"},{"Comet"},{"BMX"},{"Burrito"},{"Camper"},{"Marquis"},
{
"Baggage"},{"Dozer"},{"Maverick"},{"News Chopper"},{"Rancher"},{"FBI Rancher"},{"Virgo"},{"Greenwood"},
{
"Jetmax"},{"Hotring"},{"Sandking"},{"Blista Compact"},{"Police Maverick"},{"Boxville"},{"Benson"},
{
"Mesa"},{"RC Goblin"},{"Hotring Racer A"},{"Hotring Racer B"},{"Bloodring Banger"},{"Rancher"},
{
"Super GT"},{"Elegant"},{"Journey"},{"Bike"},{"Mountain Bike"},{"Beagle"},{"Cropdust"},{"Stunt"},
{
"Tanker"}, {"Roadtrain"},{"Nebula"},{"Majestic"},{"Buccaneer"},{"Shamal"},{"Hydra"},{"FCR-900"},
{
"NRG-500"},{"HPV1000"},{"Cement Truck"},{"Tow Truck"},{"Fortune"},{"Cadrona"},{"FBI Truck"},
{
"Willard"},{"Forklift"},{"Tractor"},{"Combine"},{"Feltzer"},{"Remington"},{"Slamvan"},
{
"Blade"},{"Freight"},{"Streak"},{"Vortex"},{"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},
{
"Firetruck LA"},{"Hustler"},{"Intruder"},{"Primo"},{"Cargobob"},{"Tampa"},{"Sunrise"},{"Merit"},
{
"Utility"},{"Nevada"},{"Yosemite"},{"Windsor"},{"Monster A"},{"Monster B"},{"Uranus"},{"Jester"},
{
"Sultan"},{"Stratum"},{"Elegy"},{"Raindance"},{"RC Tiger"},{"Flash"},{"Tahoma"},{"Savanna"},
{
"Bandito"},{"Freight Flat"},{"Streak Carriage"},{"Kart"},{"Mower"},{"Duneride"},{"Sweeper"},
{
"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},
{
"Tug"},{"Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Hotdog"},{"Club"},{"Freight Carriage"},
{
"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police Car (LSPD)"},{"Police Car (SFPD)"},
{
"Police Car (LVPD)"},{"Police Ranger"},{"Picador"},{"S.W.A.T. Van"},{"Alpha"},{"Phoenix"},{"Glendale"},
{
"Sadler"},{"Luggage Trailer A"},{"Luggage Trailer B"},{"Stair Trailer"},{"Boxville"},{"Farm Plow"},
{
"Utility Trailer"}
};
CMD:car(playeridparams[])
{
if (
IsPlayerAdmin(playerid))
    {
        new 
Index;
        new 
tmp[256];  tmp  strtok(params,Index);
        new 
tmp2[256]; tmp2 strtok(params,Index);
        new 
tmp3[256]; tmp3 strtok(params,Index);
        if(!
strlen(tmp)) return
        
SendClientMessage(playeridCOLOR_GRAD1"Usage: /car [ModelID/Name] [Colour1] [Colour2]") && //COLORS ARE NOT ESSENTIAL
        
SendClientMessage(playeridCOLOR_GRAD1"Function: Will create a Car with specified Colours");
        new 
car;
        new 
colour1colour2;
        if(!
IsNumeric(tmp))
        
car GetVehicleModelIDFromName(tmp);
        else 
car strval(tmp);
        if(
car 400 || car 611) return  SendClientMessage(playeridCOLOR_GRAD1"ERROR: Invalid Vehicle Model ID!");
        if(!
strlen(tmp2)) colour1 random(126); else colour1 strval(tmp2);//NOTICED HERE
        
if(!strlen(tmp3)) colour2 random(126); else colour2 strval(tmp3);//AND HERE
        
new LVehicleID;
        new 
Float:X,Float:Y,Float:Z;
        new 
Float:Angle,int1;
        if(
carmade ==0)
        {
        
GetPlayerPos(playeridX,Y,Z);
        
GetPlayerFacingAngle(playerid,Angle);
        
int1 GetPlayerInterior(playerid);
        
LVehicleID CreateVehicle(carX+3,Y,ZAnglecolour1colour2, -1);
        
LinkVehicleToInterior(LVehicleID,int1);
        
carmade =1;
        }
        else if(
carmade ==1)
        {
        
DestroyVehicle(GetPlayerVehicleID(playerid));
        
GetPlayerPos(playeridX,Y,Z);
        
GetPlayerFacingAngle(playerid,Angle);
        
int1 GetPlayerInterior(playerid);
        
LVehicleID CreateVehicle(carX+3,Y,ZAnglecolour1colour2, -1);
        
LinkVehicleToInterior(LVehicleID,int1);
        }
    }
    else return 
SendClientMessage(playeridCOLOR_GRAD1"   you are not authorized to use that command!");
    return 
1;
}
GetVehicleModelIDFromName(vname[])
{
    for(new 
0211i++)
    {
    if ( 
strfind(VehicleNames[i], vnametrue) != -)
    return 
400;
    }
    return -
1;

Reply
#8

i don't want car spawner command. I can not pull data when the server is open.
therefore;
the car explodes but is not respawn in the new position. Respawning in the old position
Reply
#9

Quote:
Originally Posted by kadirbnm
Посмотреть сообщение
i don't want car spawner command. I can not pull data when the server is open.
therefore;
the car explodes but is not respawn in the new position. Respawning in the old position
what the fuck are you saying man, pull data?
If what you're saying is that you want the car to respawn at the place it was destroyed at try using this, if it doesn't work then wait for someone else to answer
PHP код:
public OnVehicleDeath(vehicleidkillerid)
{
    new 
Float:newx[MAX_VEHICLES],Float:newy[MAX_VEHICLES],Float:newz[MAX_VEHICLES];
    
GetVehiclePos(vehicleid,newx[vehicleid],newy[vehicleid],newz[vehicleid]);
    
SetVehicleToRespawn(vehicleid);
    
SetVehiclePos(vehicleid,newx[vehicleid],newy[vehicleid],newz[vehicleid]);
    return 
1;

IF that's what you meant, otherwise i'm totally giving up, good luck mate.
Reply
#10

Thank you for helping. I found the mistake now.

Quote:
Originally Posted by RogueDrifter
Посмотреть сообщение
what the fuck are you saying man, pull data?
If what you're saying is that you want the car to respawn at the place it was destroyed at try using this, if it doesn't work then wait for someone else to answer
PHP код:
public OnVehicleDeath(vehicleidkillerid)
{
    new 
Float:newx[MAX_VEHICLES],Float:newy[MAX_VEHICLES],Float:newz[MAX_VEHICLES];
    
GetVehiclePos(vehicleid,newx[vehicleid],newy[vehicleid],newz[vehicleid]);
    
SetVehicleToRespawn(vehicleid);
    
SetVehiclePos(vehicleid,newx[vehicleid],newy[vehicleid],newz[vehicleid]);
    return 
1;

IF that's what you meant, otherwise i'm totally giving up, good luck mate.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)