SA-MP Forums Archive
[FilterScript] Simple City Teleporter v1.0 - 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: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Simple City Teleporter v1.0 (/showthread.php?tid=448161)



Simple City Teleporter v1.1 <UPDATED> - fahadtariq73 - 03.07.2013

INTRODUCTION
Hello, This is my very first filterscript. I don't wan't negative feedbacks. This is a simple city teleporter that teleports you to your favourite city from anywhere. The cities are Los Santos, San Fierro and Las Venturas. I will be updating it soon as possible.
.

COMMANDS
/LV
/SF
/LS


UPDATE LOG
UPDATED 2 V1.1 (FIXED COMPILE BUG)
.

DOWNLOAD
DOWNLOAD v1.1


Re: Simple City Teleporter v1.0 - SkippyBall - 03.07.2013

Код:
C:\Users\xxxxxxx\Desktop\e\teleport.pwn(94) : warning 217: loose indentation
C:\Users\xxxxxxx\Desktop\e\teleport.pwn(99) : warning 217: loose indentation
C:\Users\xxxxxxx\Desktop\e\teleport.pwn(104) : warning 217: loose indentation
It does its job.


Re: Simple City Teleporter v1.0 - xganyx - 03.07.2013

are you know how to script ? learning to script before post a fs
change this :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 if (strcmp("/ls", cmdtext, true, 10) == 0)
 {
        SetPlayerPos(playerid,2492.8408,-1671.2026,13);
  return 1;
 }
 if (strcmp("/lv", cmdtext, true, 10) == 0)
 {
        SetPlayerPos(playerid,1454.9015,1347.4325,10);
  return 1;
 }
 if (strcmp("/sf", cmdtext, true, 10) == 0)
 {
        SetPlayerPos(playerid,-1320.2717,-603.5780,14);
  return 1;
 }
 return 0;
}
to :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 	if(strcmp("/ls", cmdtext, true, 10) == 0)
	{
  		SetPlayerPos(playerid,2492.8408,-1671.2026,13);
  		return 1;
	}
 	if (strcmp("/lv", cmdtext, true, 10) == 0)
 	{
        SetPlayerPos(playerid,1454.9015,1347.4325,10);
  		return 1;
 	}
	if (strcmp("/sf", cmdtext, true, 10) == 0)
 	{
        SetPlayerPos(playerid,-1320.2717,-603.5780,14);
  		return 1;
 	}
 	return 0;
}



Re: Simple City Teleporter v1.0 - Private200 - 03.07.2013

Quote:
Originally Posted by xganyx
Посмотреть сообщение
are you know how to script ? learning to script before post a fs
change this :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 if (strcmp("/ls", cmdtext, true, 10) == 0)
 {
        SetPlayerPos(playerid,2492.8408,-1671.2026,13);
  return 1;
 }
 if (strcmp("/lv", cmdtext, true, 10) == 0)
 {
        SetPlayerPos(playerid,1454.9015,1347.4325,10);
  return 1;
 }
 if (strcmp("/sf", cmdtext, true, 10) == 0)
 {
        SetPlayerPos(playerid,-1320.2717,-603.5780,14);
  return 1;
 }
 return 0;
}
to :
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
 	if(strcmp("/ls", cmdtext, true, 10) == 0)
	{
  		SetPlayerPos(playerid,2492.8408,-1671.2026,13);
  		return 1;
	}
 	if (strcmp("/lv", cmdtext, true, 10) == 0)
 	{
        SetPlayerPos(playerid,1454.9015,1347.4325,10);
  		return 1;
 	}
	if (strcmp("/sf", cmdtext, true, 10) == 0)
 	{
        SetPlayerPos(playerid,-1320.2717,-603.5780,14);
  		return 1;
 	}
 	return 0;
}
Smarta*s, it wont change anything in the code or it's performance.

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/ls", cmdtext, true, 3) == 0)
    {
        SetPlayerPos(playerid,2492.8408,-1671.2026,13);
        return 1;
    }
    if (strcmp("/lv", cmdtext, true, 3) == 0)
    {
        SetPlayerPos(playerid,1454.9015,1347.4325,10);
        return 1;
    }
    if (strcmp("/sf", cmdtext, true, 3) == 0)
    {
        SetPlayerPos(playerid,-1320.2717,-603.5780,14);
        return 1;
    }
    return 0;
}
Command letters shall be changed from 10 to 3 because / + s + f = 3 letters not 10. Same for the other commands.

The script is good but you may provide it with other command performer like zCMD or YSI.

Good luck on future scipts.


Re: Simple City Teleporter v1.0 - fahadtariq73 - 03.07.2013

To that member who REPPED- me with disapproving WORST SCRIPTING EVER.
This is my 1st script and I don't know anything about scripting and pawno, So It was made just with a TUT.


Re: Simple City Teleporter v1.0 - Matej794 - 03.07.2013

It's okay for a beginner, but does it even work?


Re: Simple City Teleporter v1.0 - fahadtariq73 - 03.07.2013

Quote:
Originally Posted by Matej794
Посмотреть сообщение
It's okay for a beginner, but does it even work?
Yep, It works fine


Re: Simple City Teleporter v1.0 - hassantariq73 - 03.07.2013

Hi bro, I tested and used your script on your server Its working fine.


Re: Simple City Teleporter v1.0 - Matej794 - 03.07.2013

Quote:
Originally Posted by fahadtariq73
Посмотреть сообщение
Yep, It works fine
Actually, I downloaded it and tried to compile the script and I got 3 errors. I fixed them though, I can post the script here if you want to.


Re: Simple City Teleporter v1.0 - fahadtariq73 - 03.07.2013

Quote:
Originally Posted by Matej794
Посмотреть сообщение
Actually, I downloaded it and tried to compile the script and I got 3 errors. I fixed them though, I can post the script here if you want to.
Just PM ME