SA-MP Forums Archive
load position scriptfiles !!!! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: load position scriptfiles !!!! (/showthread.php?tid=71188)



load position scriptfiles !!!! - OKeY - 30.03.2009

Код:
	new File:p;
	new filename[32],templine[42];
Код:
 		p = fopen(filename, io_read);
		fread(p,templine,sizeof(templine));
	 	x = fopen(filename, io_read, "x");
		y = fopen(filename, io_read, "y");
		z = fopen(filename, io_read, "z");
EREURE:
Код:
error 017: undefined symbol "x"
warning 202: number of arguments does not match definition
error 017: undefined symbol "y"
warning 202: number of arguments does not match definition
error 017: undefined symbol "z"
warning 202: number of arguments does not match definition

help me a correct this ereur

and help me has tйlйported the player




for my English not correct



thanks



Re: load position scriptfiles !!!! - Nero_3D - 30.03.2009

Use a better translater :S

just say what you want to do
because with that code I can only say
that "fopen" opens a file and dont gets data from it


Re: load position scriptfiles !!!! - illay - 30.03.2009

OKeY,

pawn Код:
new
   Float:x,
   Float:y,
   Float:z;



Re: load position scriptfiles !!!! - OKeY - 30.03.2009

ok there made I want that:

Код:
dcmd_house(playerid,params[])
{
	new File:p;
	new house[32],templine[42];
 	p = fopen(house, io_read);
	fread(p,templine,sizeof(templine));
	x = fopen(house, io_read, "x");
	y = fopen(house, io_read, "y");
	z = fopen(house, io_read, "z");
}
and I wants to telep my player has this position!


my sripfiles :
Код:
x=3333.3
y=3333.3
z=3333.3



Re: load position scriptfiles !!!! - Nero_3D - 30.03.2009

pawn Код:
dcmd_house(playerid, params[])
{
    if(!params[0]) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /house [housename]");
    new string[32];
    format(string, sizeof(string), "%s.txt", params); //dunno which end your file has so I did ".txt"
    if(!fexist(string)) return SendClientMessage(playerid, 0xFFFFFFFF, "Warning: Housefile not founded!");
    new File:gfile = fopen(string, io_read), Float:X, Float:Y, Float:Z;
    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);
}



Re: load position scriptfiles !!!! - OKeY - 30.03.2009



yees no warn ♣ ⓐⓢⓢ thanks you one is Gods lol





Re: load position scriptfiles !!!! - OKeY - 30.03.2009

ok and how to fair a creatvehicle with the vehicle ID in this scriptfilas and that he is the driver?

and how to add the angle of the vehicle?? (always with the scripfiles??)