vehicle
#1

if i spawn that car in other virtual world , how i create X car in that virtual world
Exemple:
I'm in virtual world 500 and i use /spawncar , the car spawn but in virtual world normal. How i make to spawn in the virtual world where i am?
PHP код:
new model,color1,color2,sendername[25],string[256];
        if(
sscanf(params"iii"modelcolor1color2)) return SCM(playerid,0xFFFFFFFF"{FF9900}Scrie: {33CCFF}/spawncar <Model> <Color1> <Color2>");
        if(
model 400 || model 611) return SCM(playerid,COLOR_WHITE,"{FFB870}Invalid car ID! (400-611)");
        if(
color1 255 || color1 0) return SendClientMessage(playeridCOLOR_RED"Invalid car Color! (0-255)");
        if(
color2 || color2 255) return SendClientMessage(playeridCOLOR_RED"Invalid car Color! (0-255)");
        new 
Float:X,Float:Y,Float:Z;
        
GetPlayerVirtualWorld(playerid);
        
GetPlayerPos(playeridX,Y,Z);
         new 
carid AddStaticVehicle(modelX,Y,Z0.0,  color1color2);
        
Carspawn[carid] = carid;
           
GetPlayerName(playeridsendernamesizeof(sendername));
           new 
vehicles GetVehicleModel(carid) - 400;
        
format(stringsizeof(string), "AdmCmd: %s has spawned a %s.",sendername,aVehicleNames[vehicles]);
        
ABroadCast(COLOR_ADMCOMMANDSstring4);
        
format(string,sizeof(string),"VehLog: %s has spawned car model %d.",sendername,model);
        
Adminlog(string);
        
LinkVehicleToInterior(caridGetPlayerInterior(playerid)); 
Reply
#2

Add SetVehicleVirtualWorld(carid, GetPlayerVirtualWorld(playerid));
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)