[FilterScript] Simple City Teleporter v1.0
#4

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.
Reply


Messages In This Thread
Simple City Teleporter v1.1 <UPDATED> - by fahadtariq73 - 03.07.2013, 10:42
Re: Simple City Teleporter v1.0 - by SkippyBall - 03.07.2013, 10:49
Re: Simple City Teleporter v1.0 - by xganyx - 03.07.2013, 11:01
Re: Simple City Teleporter v1.0 - by Private200 - 03.07.2013, 11:42
Re: Simple City Teleporter v1.0 - by fahadtariq73 - 03.07.2013, 13:29
Re: Simple City Teleporter v1.0 - by Matej794 - 03.07.2013, 18:23
Re: Simple City Teleporter v1.0 - by fahadtariq73 - 03.07.2013, 19:01
Re: Simple City Teleporter v1.0 - by hassantariq73 - 03.07.2013, 19:02
Re: Simple City Teleporter v1.0 - by Matej794 - 03.07.2013, 19:07
Re: Simple City Teleporter v1.0 - by fahadtariq73 - 03.07.2013, 19:39

Forum Jump:


Users browsing this thread: 1 Guest(s)