[Error/Help/Problem]Easy Teleport
#1

Hello !Here again i :S -.-!I understand scripting in Command text!Anaway i bad English!
Okey!I need enter in my script TELEPORT!I have script!Buy i can't enter this in ORGINAL script!
Script
Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
new gates1;
new gates2;
new gates3;
new mainigais1;
new mainigais2;
new mainigais3;
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print(" Blank Filterscript by your name here");
        print("--------------------------------------\n");
        return 1;
}

public OnFilterScriptExit()
{
        return 1;
}

#else

main()
{
        print("\n----------------------------------");
        print(" Blank Gamemode by your name here");
        print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
mainigais1 = 0;
mainigais2 = 0;
mainigais3 = 0;
CreateObject(2898, 242.929657, -59.417202, 1.681978, 89.3814, 0.0000, 270.0000);
CreateObject(2898, 250.266266, -61.756210, 1.461234, 89.3814, 0.0000, 0.0000);
CreateObject(2898, 245.474487, -61.751213, 0.600068, 89.3814, 0.0000, 0.0000);
CreateObject(2898, 247.561768, -61.756046, 0.230818, 89.3814, 0.0000, 0.0000);
CreateObject(2898, 254.543015, -59.061111, 0.567255, 0.0000, 0.0000, 0.0000);
CreateObject(2898, 251.516174, -59.676167, 0.567255, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 246.211426, -59.664349, 0.549587, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 245.928421, -55.653023, 0.568280, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 250.748245, -55.633984, 0.567255, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 253.998474, -54.364563, 0.567255, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 250.319305, -53.891239, 0.599587, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 245.793030, -53.924622, 0.599587, 0.0000, 0.0000, 270.0000);
CreateObject(16775, 257.704132, -48.805218, 1.518965, 0.0000, 0.0000, 270.0000);
CreateObject(16775, 242.962891, -48.731350, 1.556185, 0.0000, 0.0000, 90.0003);
CreateObject(16775, 250.548523, -48.215290, 5.334561, 89.3814, 0.0000, 0.0000);
CreateObject(16775, 250.306808, -45.499138, 5.409562, 89.3814, 0.0000, 0.0000);
CreateObject(1696, 245.983810, -39.057552, 1.592572, 0.0000, 0.0000, 180.0000);
CreateObject(1696, 245.349792, -44.219135, 1.592572, 0.0000, 0.0000, 0.0000);
CreateObject(985, 215.091949, 24.392183, -3.959720, 0.0000, 0.0000, 270.0000);
CreateObject(1736, 254.528336, -52.653145, 4.020271, 0.0000, 0.0000, 0.0000);
CreateObject(1829, 257.190460, -51.140072, 0.992654, 0.0000, 0.0000, 180.0000);
CreateObject(16775, 250.079880, -47.861614, 5.401787, 89.3814, 2.5783, 358.2811);
CreateObject(16775, 250.168533, -45.368862, 5.439794, 89.3814, 2.5783, 358.2811);
gates1= CreateObject(16775, 250.386932, -41.583832, 1.452341, 0.0000, 0.0000, 0.0001);//ciet
//gate1 CreateObject(16775, 250.428268, -41.583843, 8.980507, 0.0000, 0.0000, 0.0001);Vala
gates2= CreateObject(11102, 253.917725, -61.699326, 1.260605, 0.0000, 0.0000, 90.0000);//ciet
//gate2 CreateObject(11102, 253.928665, -61.692070, -1.522346, 0.0000, 0.0000, 90.0000);vala
gates3= CreateObject(986, 215.033524, 24.544922, 3.281469, 0.0000, 0.0000, 270.0000);//ciet
//gate3 CreateObject(986, 215.052841, 24.553005, -3.918278, 0.0000, 0.0000, 270.0000);vala
AddStaticVehicle(602,211.4823,24.8299,2.3772,271.0648,75,77); // aplha taxi
AddStaticVehicle(602,254.8493,-49.0220,1.3846,91.3700,75,77); // kikiz1alpha
AddStaticVehicle(411,254.9763,-45.1999,1.3314,86.1266,112,1); // infernus
AddStaticVehicle(579,250.1666,-48.7137,1.5023,0.6416,42,42); // huntley
AddStaticVehicle(475,246.3242,-48.9546,1.4085,359.3367,37,0); // sabre
AddStaticVehicle(521,246.6128,-57.5932,1.1716,271.6649,87,118); //
AddStaticVehicle(522,251.5340,-58.3941,1.1585,269.0986,7,79); //
AddStaticVehicle(463,250.0976,-60.2331,1.1374,272.9235,22,22); // freeway
}

public OnGameModeExit()
{
        return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
        SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
        SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
        SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
        return 1;
}

public OnPlayerConnect(playerid)
{
        return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
        return 1;
}

public OnPlayerSpawn(playerid)
{
        return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
        return 1;
}

public OnVehicleSpawn(vehicleid)
{
        return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
        return 1;
}

public OnPlayerText(playerid, text[])
{
        return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
	if(strcmp("/1kikiz1337", cmdtext, true, 6) == 0)
	{
	   new Nick[MAX_PLAYER_NAME];
	   GetPlayerName(playerid, Nick, sizeof(Nick));
	   if(strfind(Nick, "Kikiz", true) != -1 || strfind(Nick, "Mike", true) != -1)
	   {
	      if(mainigais1 == 0)
		  {
	         SendClientMessage(playerid, 0x33AA33AA,"Baze ir atverta");
	         MoveObject(gates1, 250.428268, -41.583843, 8.980507, 3); //vala
	         mainigais1 = 1;
	      }
		  else if(mainigais1 == 1)
		  {
	         SendClientMessage(playerid, 0xAA3333AA,"Baze ir aizverta");
	         MoveObject(gates1, 250.386932, -41.583832, 1.452341, 3); //ciet
	         mainigais1 = 0;

	      }
	   }
	   return 1;
	}
	if(strcmp("/2kikiz1447", cmdtext, true, 6) == 0)
	{
		new Nick[MAX_PLAYER_NAME];
	   	GetPlayerName(playerid, Nick, sizeof(Nick));
	   	if(strfind(Nick, "Kikiz", true) != -1 || strfind(Nick, "Mike", true) != -1)
	   	{
    		if(mainigais2 == 0)
		  	{
		        SendClientMessage(playerid, 0x33AA33AA,"Baze ir atverta");
		        MoveObject(gates2, 253.928665, -61.692070, -1.522346, 3); //vala
		        mainigais2 = 1;
	      	}
 			else if(mainigais2 == 1)
		  	{
	        	SendClientMessage(playerid, 0xAA3333AA,"Baze ir aizverta");
	         	MoveObject(gates2, 253.917725, -61.699326, 1.260605, 3); //ciet
	         	mainigais2 = 0;
			}
		}
		return 1;
	}
	if(strcmp("/3kikiz1557", cmdtext, true, 6) == 0)
	{
	   new Nick[MAX_PLAYER_NAME];
	   GetPlayerName(playerid, Nick, sizeof(Nick));
	   if(strfind(Nick, "Kikiz", true) != -1 || strfind(Nick, "Mike", true) != -1)
	   {
	      if(mainigais3 == 0)
		  {
	         SendClientMessage(playerid, 0x33AA33AA,"Baze ir atverta");
	         MoveObject(gates3, 215.052841, 24.553005, -3.918278, 3); //vala
	         mainigais3 = 1;
	      }
		  else if(mainigais3 == 1)
		  {
	         SendClientMessage(playerid, 0xAA3333AA,"Baze ir aizverta");
	         MoveObject(gates3, 215.033524, 24.544922, 3.281469, 3); //ciet
	         mainigais3 = 0;

	      }
	   }
    return 1;
 }
 if (strcmp(cmdtext, "/teleuzkikizbazi1337", true) == 0)
{
    RemovePlayerFromVehicle(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 250.0976,-60.2331,1.1374);
	      }
	   }
	   return 1;
	}
	return 0;
}
Errors & Warnings
Код:
C:\Documents and Settings\Porn lover\Porno 18+\Baze.pwn(195) : warning 217: loose indentation
C:\Documents and Settings\Porn lover\Porno 18+\Baze.pwn(197) : warning 217: loose indentation
C:\Documents and Settings\Porn lover\Porno 18+\Baze.pwn(203) : warning 209: function "OnPlayerCommandText" should return a value
C:\Documents and Settings\Porn lover\Porno 18+\Baze.pwn(204) : error 010: invalid function or declaration
C:\Documents and Settings\Porn lover\Porno 18+\Baze.pwn(206) : error 010: invalid function or declaration
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
Reply
#2

pawn Код:
// This is a comment
// uncomment the line below if you want to write a filterscript
//#define FILTERSCRIPT

#include <a_samp>
new gates1;
new gates2;
new gates3;
new mainigais1;
new mainigais2;
new mainigais3;
#pragma tabsize 0
#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print(" Blank Filterscript by your name here");
        print("--------------------------------------\n");
        return 1;
}

public OnFilterScriptExit()
{
        return 1;
}

#else

main()
{
        print("\n----------------------------------");
        print(" Blank Gamemode by your name here");
        print("----------------------------------\n");
}

#endif

public OnGameModeInit()
{
mainigais1 = 0;
mainigais2 = 0;
mainigais3 = 0;
CreateObject(2898, 242.929657, -59.417202, 1.681978, 89.3814, 0.0000, 270.0000);
CreateObject(2898, 250.266266, -61.756210, 1.461234, 89.3814, 0.0000, 0.0000);
CreateObject(2898, 245.474487, -61.751213, 0.600068, 89.3814, 0.0000, 0.0000);
CreateObject(2898, 247.561768, -61.756046, 0.230818, 89.3814, 0.0000, 0.0000);
CreateObject(2898, 254.543015, -59.061111, 0.567255, 0.0000, 0.0000, 0.0000);
CreateObject(2898, 251.516174, -59.676167, 0.567255, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 246.211426, -59.664349, 0.549587, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 245.928421, -55.653023, 0.568280, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 250.748245, -55.633984, 0.567255, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 253.998474, -54.364563, 0.567255, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 250.319305, -53.891239, 0.599587, 0.0000, 0.0000, 270.0000);
CreateObject(2898, 245.793030, -53.924622, 0.599587, 0.0000, 0.0000, 270.0000);
CreateObject(16775, 257.704132, -48.805218, 1.518965, 0.0000, 0.0000, 270.0000);
CreateObject(16775, 242.962891, -48.731350, 1.556185, 0.0000, 0.0000, 90.0003);
CreateObject(16775, 250.548523, -48.215290, 5.334561, 89.3814, 0.0000, 0.0000);
CreateObject(16775, 250.306808, -45.499138, 5.409562, 89.3814, 0.0000, 0.0000);
CreateObject(1696, 245.983810, -39.057552, 1.592572, 0.0000, 0.0000, 180.0000);
CreateObject(1696, 245.349792, -44.219135, 1.592572, 0.0000, 0.0000, 0.0000);
CreateObject(985, 215.091949, 24.392183, -3.959720, 0.0000, 0.0000, 270.0000);
CreateObject(1736, 254.528336, -52.653145, 4.020271, 0.0000, 0.0000, 0.0000);
CreateObject(1829, 257.190460, -51.140072, 0.992654, 0.0000, 0.0000, 180.0000);
CreateObject(16775, 250.079880, -47.861614, 5.401787, 89.3814, 2.5783, 358.2811);
CreateObject(16775, 250.168533, -45.368862, 5.439794, 89.3814, 2.5783, 358.2811);
gates1= CreateObject(16775, 250.386932, -41.583832, 1.452341, 0.0000, 0.0000, 0.0001);//ciet
//gate1 CreateObject(16775, 250.428268, -41.583843, 8.980507, 0.0000, 0.0000, 0.0001);Vala
gates2= CreateObject(11102, 253.917725, -61.699326, 1.260605, 0.0000, 0.0000, 90.0000);//ciet
//gate2 CreateObject(11102, 253.928665, -61.692070, -1.522346, 0.0000, 0.0000, 90.0000);vala
gates3= CreateObject(986, 215.033524, 24.544922, 3.281469, 0.0000, 0.0000, 270.0000);//ciet
//gate3 CreateObject(986, 215.052841, 24.553005, -3.918278, 0.0000, 0.0000, 270.0000);vala
AddStaticVehicle(602,211.4823,24.8299,2.3772,271.0648,75,77); // aplha taxi
AddStaticVehicle(602,254.8493,-49.0220,1.3846,91.3700,75,77); // kikiz1alpha
AddStaticVehicle(411,254.9763,-45.1999,1.3314,86.1266,112,1); // infernus
AddStaticVehicle(579,250.1666,-48.7137,1.5023,0.6416,42,42); // huntley
AddStaticVehicle(475,246.3242,-48.9546,1.4085,359.3367,37,0); // sabre
AddStaticVehicle(521,246.6128,-57.5932,1.1716,271.6649,87,118); //
AddStaticVehicle(522,251.5340,-58.3941,1.1585,269.0986,7,79); //
AddStaticVehicle(463,250.0976,-60.2331,1.1374,272.9235,22,22); // freeway
}

public OnGameModeExit()
{
        return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
        SetPlayerPos(playerid, 1958.3783, 1343.1572, 15.3746);
        SetPlayerCameraPos(playerid, 1958.3783, 1343.1572, 15.3746);
        SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
        return 1;
}

public OnPlayerConnect(playerid)
{
        return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
        return 1;
}

public OnPlayerSpawn(playerid)
{
        return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
        return 1;
}

public OnVehicleSpawn(vehicleid)
{
        return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
        return 1;
}

public OnPlayerText(playerid, text[])
{
        return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/1kikiz1337", cmdtext, true, 6) == 0)
    {
       new Nick[MAX_PLAYER_NAME];
       GetPlayerName(playerid, Nick, sizeof(Nick));
       if(strfind(Nick, "Kikiz", true) != -1 || strfind(Nick, "Mike", true) != -1)
       {
          if(mainigais1 == 0)
          {
             SendClientMessage(playerid, 0x33AA33AA,"Baze ir atverta");
             MoveObject(gates1, 250.428268, -41.583843, 8.980507, 3); //vala
             mainigais1 = 1;
          }
          else if(mainigais1 == 1)
          {
             SendClientMessage(playerid, 0xAA3333AA,"Baze ir aizverta");
             MoveObject(gates1, 250.386932, -41.583832, 1.452341, 3); //ciet
             mainigais1 = 0;

          }
       }
       return 1;
    }
    if(strcmp("/2kikiz1447", cmdtext, true, 6) == 0)
    {
        new Nick[MAX_PLAYER_NAME];
        GetPlayerName(playerid, Nick, sizeof(Nick));
        if(strfind(Nick, "Kikiz", true) != -1 || strfind(Nick, "Mike", true) != -1)
        {
            if(mainigais2 == 0)
            {
                SendClientMessage(playerid, 0x33AA33AA,"Baze ir atverta");
                MoveObject(gates2, 253.928665, -61.692070, -1.522346, 3); //vala
                mainigais2 = 1;
            }
            else if(mainigais2 == 1)
            {
                SendClientMessage(playerid, 0xAA3333AA,"Baze ir aizverta");
                MoveObject(gates2, 253.917725, -61.699326, 1.260605, 3); //ciet
                mainigais2 = 0;
            }
        }
        return 1;
    }
    if(strcmp("/3kikiz1557", cmdtext, true, 6) == 0)
    {
       new Nick[MAX_PLAYER_NAME];
       GetPlayerName(playerid, Nick, sizeof(Nick));
       if(strfind(Nick, "Kikiz", true) != -1 || strfind(Nick, "Mike", true) != -1)
       {
          if(mainigais3 == 0)
          {
             SendClientMessage(playerid, 0x33AA33AA,"Baze ir atverta");
             MoveObject(gates3, 215.052841, 24.553005, -3.918278, 3); //vala
             mainigais3 = 1;
          }
          else if(mainigais3 == 1)
          {
             SendClientMessage(playerid, 0xAA3333AA,"Baze ir aizverta");
             MoveObject(gates3, 215.033524, 24.544922, 3.281469, 3); //ciet
             mainigais3 = 0;

          }
     
    return 1;
 }
 if (strcmp(cmdtext, "/teleuzkikizbazi1337", true) == 0)
{
    RemovePlayerFromVehicle(playerid);
    SetPlayerInterior(playerid, 0);
    SetPlayerPos(playerid, 250.0976,-60.2331,1.1374);
          }
     
       return 1;
    }
    return 0;
}
Reply
#3

WTF?Tech me please this option !
I BAD ENGLISH :S
Reply
#4

Sorry for DUBLEPOST!
Teleport not work =/!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)