my vehicle system isnt working right ?! +Rep
#3

Try this
PHP код:
CMD:car(playerid,params[]) {
        new 
tmp[128], tmp2[128], tmp3[128], Indextmp strtok(params,Index), tmp2 strtok(params,Index); tmp3 strtok(params,Index);
        if(
isnull(tmp)) return SendClientMessage(playeridred"USAGE: /car [Modelid/Name] [colour1] [colour2]");
        new 
carcolour1colour2string[128];
           if(!
IsNumeric(tmp)) car GetVehicleModelIDFromName(tmp); else car strval(tmp);
        if(
car 400 || car 611) return  SendClientMessage(playeridred"ERROR: Invalid Vehicle Model");
        if(
isnull(tmp2)) colour1 random(126); else colour1 strval(tmp2);
        if(
isnull(tmp3)) colour2 random(126); else colour2 strval(tmp3);
        new 
LVehicleID,Float:X,Float:Y,Float:ZFloat:Angle,int1;    GetPlayerPos(playeridX,Y,Z);    GetPlayerFacingAngle(playerid,Angle);   int1 GetPlayerInterior(playerid);
        
LVehicleID CreateVehicle(carX+3,Y,ZAnglecolour1colour2, -1); LinkVehicleToInterior(LVehicleID,int1);
        
CMDMessageToAdmins(playerid,"CAR");
        
format(stringsizeof(string), "%s spawned a \"%s\" (Model:%d) colour (%d, %d), at %0.2f, %0.2f, %0.2f"pName(playerid), VehicleName[car-400], carcolour1colour2XYZ);
        
SaveToFile("CarSpawns",string);
        
format(stringsizeof(string), "You have spawned a \"%s\" (Model:%d) colour (%d, %d)"VehicleName[car-400], carcolour1colour2);
        
PutPlayerInVehicle(playeridLVehicleID0);
        
VehicleInfo[LVehicleID][Temp] = 1;
        return 
SendClientMessage(playerid,bluestring);

Reply


Messages In This Thread
my vehicle system isnt working right ?! +Rep - by YoussefHammad - 28.08.2015, 22:39
Re: my vehicle system isnt working right ?! +Rep - by YoussefHammad - 29.08.2015, 01:12
Re: my vehicle system isnt working right ?! +Rep - by DarkLight - 29.08.2015, 01:31
Re: my vehicle system isnt working right ?! +Rep - by YoussefHammad - 29.08.2015, 02:36

Forum Jump:


Users browsing this thread: 1 Guest(s)