[help] I can't fix this problem..
#1

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(playeridfile_Float(GetTeleportFile(cmdtext[1]), "FacingAngel"));
        
SetPlayerPos(playeridfile_Float(GetTeleportFile(cmdtext[1]), "PosX"), file_Float(GetTeleportFile(cmdtext[1]), "PosY"),
        
file_Float(GetTeleportFile(cmdtext[1]), "PosZ")); 
        return 
1;
    } 
Reply
#2

What does/should GetTeleportFile(cmdtext[1]) return?
If it says unknow command, then it already fails at the strcmp
Reply
#3

PHP код:
stock GetTeleportFile(cmd[])
{
    new
        
String[120];
    
format(Stringsizeof String"Teleports/%s.txt"cmd);
    return 
String;

it's returns the values in the file..

i think it's ok.
Reply
#4

someone?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)