load agle and vehicle id in scriptfiles !!!!
#1

hi

here is the code that help make my:

Код:
 		fread(gfile, string), A = floatstr(string[2]);
		GetPlayerFacingAngle(playerid,A);
		fread(gfile, string), X = floatstr(string[2]);
		fread(gfile, string), Y = floatstr(string[2]);
		fread(gfile, string), Z = floatstr(string[2]);
		return SetPlayerPos(playerid, X, Y, Z);
and please help me add the angle of the vehicle and also to load the vehicle id


ps: and use PutPlayerInVehicle

MODIF:
can you help me chere a model car and teleport to the car ?? :P

thank


Reply
#2

sry but I made a modification
Reply
#3

pawn Код:
new Float:Pos[4], i, count = 3, lastvid;
    while(fread(gfile, string))
        for(i = strlen(string); i >= 0; i--)
        {
            if(i == 0)
            {
                if(count != -1) break;
                lastvid = CreateVehicle(strval(string), Pos[0], Pos[1], Pos[2], Pos[3], -1, -1, -1);
            }
            else if(string[i] == ',')
            {
                Pos[count--] = floatstr(string);
                string[i] = EOS;
            }
        }
    PutPlayerInVehicle(playerid, lastvid, 0);
    return true;
Not tested


the file just looks so
Код:
522, 333.3, 333.3, 333.3, 180.0
Reply
#4

slut I made my own code but when I order I made the server crash
Код:
 		fread(gfile, string), A = floatstr(string[2]);
		fread(gfile, string), X = floatstr(string[2]);
		fread(gfile, string), Y = floatstr(string[2]);
		fread(gfile, string), Z = floatstr(string[2]);
		fread(gfile, string), model = strval(string[2]);
		SetPlayerPos(playerid, X, Y, Z);
		GetPlayerFacingAngle(playerid,A);
		carmdl = CreateVehicle(model,X,Y,Z,A,6,6,50000);
		PutPlayerInVehicle(playerid, carmdl, 0);
		spawnveh = 1;
/ hause
and crash
Reply
#5

do it so
pawn Код:
fread(gfile, string), model = strval(string[6]);
        fread(gfile, string), X = floatstr(string[2]);
        fread(gfile, string), Y = floatstr(string[2]);
        fread(gfile, string), Z = floatstr(string[2]);
        fread(gfile, string), A = floatstr(string[2]);
        carmdl = CreateVehicle(model,X,Y,Z,A,6,6,50000);
        PutPlayerInVehicle(playerid, carmdl, 0);
        spawnveh = 1;
the file must look so
Код:
model=522
X=333.3
Y=333.3
Z=333.3
A=333.3
Reply
#6

Код:
A=8911,26
X=2466.2878
Y=-1659.0990
Z=12.8300
model=522
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)