25.11.2011, 20:17
Ok, so I am on one project a while, and thats ingame PAWN scripter & teleport creator! (yes, you will be able to create scripts from ingame)
I dont have problems with creating functions through dialogs, but with creating teleports I have one f***ing annoying problem!
And this is what it generates:
Should generate right coords, but always generates this! Please help me, cant continue my project until this is fixed!
I dont have problems with creating functions through dialogs, but with creating teleports I have one f***ing annoying problem!
Код:
new Float:Xp; new Float:Yp; new Float:Zp; new Float:Angle; GetPlayerPos(playerid,Xp,Yp,Zp); GetPlayerFacingAngle(playerid,Angle); new Tele[1000]; new TelePawn[1000]; format(Tele,sizeof(Tele),"\n\npublic OnPlayerCommandText(playerid, cmdtext[])\n{\n\tif(strcmp(/tele, cmdtext, true, 10) == 0)//add apostrophes to tele\n\t{\n\t\tSetPlayerPos(playerid,%d);\n\t\tSetPlayerFacingAngle(playerid,%d);\n\t\tSetCameraBehindPlayer(playerid);\n\t\treturn 1;\n\t}\n\treturn 0;\n}", GetPlayerPos(playerid,Xp,Yp,Zp), GetPlayerFacingAngle(playerid,Angle)); format(TelePawn,sizeof(TelePawn),"script.pwn"); new File: PwnFile; PwnFile = fopen(TelePawn,io_append); fwrite(PwnFile,Tele); fclose(PwnFile);
Код:
SetPlayerPos(playerid,1,1,0); SetPlayerFacingAngle(playerid,1);