[help] I can't fix this problem.. - 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: [help] I can't fix this problem.. (
/showthread.php?tid=179354)
[help] I can't fix this problem.. -
Gangste[R] - 26.09.2010
hello scriptes!
i tried to build Teleport system, with this system you can create teleports in the server..
but When you trying to do Command of the teleport it's says "SERVER:Unknow command" ..
this is my function
PHP код:
if(strcmp(cmdtext[1], GetTeleportFile(cmdtext[1]), true) == 0)
{
SetPlayerFacingAngle(playerid, file_Float(GetTeleportFile(cmdtext[1]), "FacingAngel"));
SetPlayerPos(playerid, file_Float(GetTeleportFile(cmdtext[1]), "PosX"), file_Float(GetTeleportFile(cmdtext[1]), "PosY"),
file_Float(GetTeleportFile(cmdtext[1]), "PosZ"));
return 1;
}
Re: [help] I can't fix this problem.. -
Mauzen - 26.09.2010
What does/should GetTeleportFile(cmdtext[1]) return?
If it says unknow command, then it already fails at the strcmp
Re: [help] I can't fix this problem.. -
Gangste[R] - 26.09.2010
PHP код:
stock GetTeleportFile(cmd[])
{
new
String[120];
format(String, sizeof String, "Teleports/%s.txt", cmd);
return String;
}
it's returns the values in the file..
i think it's ok.
Re: [help] I can't fix this problem.. -
Gangste[R] - 26.09.2010
someone?