if (strcmp(\"/nyit\", cmdtext, true, 10) == 0){MoveObject(sorompo, 1069.8994141,1359,10.5,0,334.9951172,0);//This will move the gate}return 1;}if (strcmp(\"/zar\", cmdtext, true, 10) == 0){MoveObject(sorompo, 1069.8994141,1359,10.5,0,270,0);//This will move the gate back to the old position}return 1;}
C:\\Users\\Peter\\Desktop\\Sa-MP\\gamemodes\\basic.pwn(226) : error 010: invalid function or declarationC:\\Users\\Peter\\Desktop\\Sa-MP\\gamemodes\\basic.pwn(230) : error 010: invalid function or declarationC:\\Users\\Peter\\Desktop\\Sa-MP\\gamemodes\\basic.pwn(232) : error 010: invalid function or declarationC:\\Users\\Peter\\Desktop\\Sa-MP\\gamemodes\\basic.pwn(237) : error 010: invalid function or declarationC:\\Users\\Peter\\Desktop\\Sa-MP\\gamemodes\\basic.pwn(239) : error 010: invalid function or declarationC:\\Users\\Peter\\Desktop\\Sa-MP\\gamemodes\\basic.pwn(242) : error 010: invalid function or declarationC:\\Users\\Peter\\Desktop\\Sa-MP\\gamemodes\\basic.pwn(244) : error 010: invalid function or declarationPawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 7 Errors.
if (strcmp(\"/nyit\", cmdtext, true, 10) == 0){MoveObject(sorompo, 1069.8994141,1359,10.5,0,334.9951172,0);//This will move the gatereturn 1;}if (strcmp(\"/zar\", cmdtext, true, 10) == 0){MoveObject(sorompo, 1069.8994141,1359,10.5,0,270,0);//This will move the gate back to the old position return 1;}
if(strcmp(cmdtext,\"/nyit\",true) == 0){ MoveObject(sorompo, 1069.8994141,1359,10.5,0,334.9951172,0,2.0); return 1;}if(strcmp(cmdtext,\"/zár\",true) == 0){ MoveObject(sorompo, 1069.8994141,1359,10.5,0,270,0,2.0); return 1;}
/CreateObject(968,1069.8994141,1359.0000000,10.5000000,0.0000000,270.0000000,0.0000000); //object(barrierturn) (1) zarva//CreateObject(968,1069.8994141,1359.0000000,10.5000000,0.0000000,334.9951172,0.0000000); //object(barrierturn) (1) nyitva
if (strcmp(\"/zár\", cmdtext, true, 10) == 0){ new Float:X; new Float:Y; new Float:Z; GetObjectRot(sorompo,X,Y,Z); RotateObject(sorompo,1069.8994141,1359.0000000,10.5000000-0,270,0,2.0); //Hibás sor return 1;}
C:\\Users\\Peter\\Desktop\\Sa-MP\\gamemodes\\basic.pwn(226) : error 017: undefined symbol \"RotateObject\"Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase 1 Error.
#include <a_samp>#include <G_ObjectsRot>#include <zcmd>#define COLOR_YELLOW 0xFFFF00AAnew sorompo1;public OnFilterScriptInit(){ print(\"\\n--------------------------------------\"); print(\"========= Sorompó ======= Code =========\"); print(\"--------------------------------------\\n\"); sorompo1 = CreateObject(968, 1069.8994,1359.0000,10.5000, 0.000000,90.0000,270.0000); //létrehozzuk a sorompót //ide írhatod a többi sorompót //meg ide //..stb return 1;}CMD:nyit(playerid,params[]){ RotateObject(sorompo1,0.0000,0.0000,270.0000,300,1.0); //felnyitjuk SetObjectRotationSpeed(sorompo1,80.0); SendClientMessage(playerid, COLOR_YELLOW,\"> Sorompó felnyitása <\"); SetTimer(\"lecsukodas\",6000, false); //6 mp múlva lecsukódik magától return 1;}/*CMD:zar(playerid,params[]){ RotateObject(sorompo1,0.0000,90.0000,270.0000,300,1.0); SetObjectRotationSpeed(sorompo1,80.0); SendClientMessage(playerid, COLOR_YELLOW,\"> Sorompó lecsukása <\"); return 1;}*/ forward lecsukodas(playerid); //automata lecsukódáspublic lecsukodas(playerid){ RotateObject(sorompo1,0.0000,90.0000,270.0000,300,1.0); //lecsukjuk SetObjectRotationSpeed(sorompo1,80.0); SendClientMessage(playerid, COLOR_YELLOW,\"> Sorompó lecsukása <\");}public OnObjectRotated(objectid){ return 1;}public OnObjectStopRotate(objectid){ return 1;}public OnObjectStopBucle(objectid){ return 1;}
Parameters:(objectid, Float:X, Float:Y, Float:Z, Float:Speed, Float:RotX = -1000.0, Float:RotY = -1000.0, Float:RotZ = -1000.0)objectid The ID of the object to move.Float:X The X coordinate to move the object to.Float:Y The Y coordinate to move the object to.Float:Z The Z coordinate to move the object to.Float:Speed The speed at which to move the object (units per second).Float:RotX The FINAL X rotation (optional).Float:RotY The FINAL Y rotation (optional).Float:RotZ The FINAL Z rotation (optional).[/quote]A mozgatással lehet forgatni is, RotX, RotY, RotZ adja meg a mozgás végén hogy legyen az object, mozgás közben fog forogni, feltéve, hogy megfelelõ sebességgel mozgatod, de mivel a forgatás mozgás közben valósul meg, így elengedhetetlen, hogy az object mozogjon, legalább egy minimálisat.Most lényegében leírtam ugyanazt, mint elõbb.