SA-MP Forums Archive
Need help +rep. - 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)
+--- Thread: Need help +rep. (/showthread.php?tid=614652)



Need help +rep. - Farzam - 10.08.2016

as the topic says.

getmypos.pwn(10) : error 035: argument type mismatch (argument 2)

1 errors.

format(string, sizeof string, ">> X %0.1f Y %0.1f Z %0.1f Angle %0.1f", x,y,z);
SendClientMessage(playerid, string);

Error lines, & script.


Re: Need help +rep. - WhiteGhost - 10.08.2016

Missing the color parameter,
https://sampwiki.blast.hk/wiki/SendClientMessage

Код:
new string[100],Pos,Float:X,Float:Z,Float:Y;
Pos = GetPlayerPos(playerid,X,Y,Z);
format(string,sizeof(string),"X:%f Y:%f Z:f",Pos);
SendClientMessage(playerid,-1,string);



Re: Need help +rep. - Ahmed21 - 10.08.2016

Try this:

PHP код:
format(stringsizeof(string), ">> X %0.1f Y %0.1f Z %0.1f Angle %0.1f"x,y,z);
SendClientMessage(playerid, -1string); 



Re: Need help +rep. - Sew_Sumi - 10.08.2016

Just so you know, /save actually makes a co-ord save, in car or on foot, in your GTA SA User files.

If you put text after /save it'll also make that as part of the comment for that co-ord.


Re: Need help +rep. - Farzam - 10.08.2016

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Just so you know, /save actually makes a co-ord save, in car or on foot, in your GTA SA User files.

If you put text after /save it'll also make that as part of the comment for that co-ord.
I know mate, It's /getpos actually, using to get players position.
+rep to who helped. thx all.


Re: Need help +rep. - Sew_Sumi - 10.08.2016

Quote:
Originally Posted by Farzam
Посмотреть сообщение
I know mate, It's /getpos actually, using to get players position.
+rep to who helped. thx all.
It's actually /save, a default command from the client.

Another is /rs which saves the x/y/z/angle of the player alone without all the extra weapons/skin info.


It's a good thing to make your own if you are using the data in the script, but if you are simply saving positions, this is redundant.