My /local dosn't work
#9

Quote:
Originally Posted by Klutty
pawn Код:
if(!strcmp(cmdtext, "/b", true, 10) == 0)
This?
Now it gives me two warnings and is still dont work

warning 213: tag mismatch
warning 202: number of arguments does not match definition

Here is my script, look through it.

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/kill", cmdtext, true, 10) == 0)
	{
		SetPlayerHealth(playerid,0.0);
		return 1;
	}
	
	if(!strcmp(cmdtext, "/ooc", true, 3))
	{
		new str[256], pname[256];
		GetPlayerName(playerid, pname, 256);
		format(str, 256, "(( Ooc: %s:%s ))", pname, cmdtext[4]);
		SendClientMessageToAll(0xFFFFFFAA, str);
 		return 1;
	}

  if(!strcmp(cmdtext, "/b", true, 10) == 0)
	{
	  for(new i = 0; i < MAX_PLAYERS; i++)
	  {
	  	if(GetDistanceBetweenPlayers(playerid) <= 20)
	  	{
	    	if(cmdtext[2] == 32 || cmdtext[3] != EOS)
	    	{
	      	new str[128];
	      	format(str, 128, "%s: %s", Name(playerid), cmdtext[3]);
	      	SendClientMessage(playerid, 0xFFFFFFAA, str);
				}
			}
		}
	}
	return true;
}

public OnPlayerInfoChange(playerid)
{
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

public OnRconCommand(cmd[])
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
	return 1;
}

public OnPlayerSelectedMenuRow(playerid, row)
{
	return 1;
}

public OnPlayerExitedMenu(playerid)
{
	return 1;
}

Name(playerid)
{
  new n[24];
  GetPlayerName(playerid, n, 24);
  return n;
}

stock GetDistanceBetweenPlayers(playerid, playerid2)
{
new Float:x1, Float:y1, Float:z1, Float:x2, Float:y2, Float:z2;
new Float:tmpdis;
GetPlayerPos(playerid, x1, y1, z1);
GetPlayerPos(playerid2, x2, y2, z2);
tmpdis = floatsqroot(floatpower(floatabs(floatsub(x2, x1)), 2)
+ floatpower(floatabs(floatsub(y2, y1)), 2)
+ floatpower(floatabs(floatsub(z2, z1)), 2));
return floatround(tmpdis);
}
Reply


Messages In This Thread
My /local dosn't work - by FreddeN - 24.05.2009, 13:51
Re: My /local dosn't work - by Correlli - 24.05.2009, 14:01
Re: My /local dosn't work - by FreddeN - 24.05.2009, 14:10
Re: My /local dosn't work - by Correlli - 24.05.2009, 14:12
Re: My /local dosn't work - by FreddeN - 24.05.2009, 14:19
Re: My /local dosn't work - by Klutty - 24.05.2009, 14:28
Re: My /local dosn't work - by FreddeN - 24.05.2009, 14:34
Re: My /local dosn't work - by Klutty - 24.05.2009, 14:36
Re: My /local dosn't work - by FreddeN - 24.05.2009, 14:40
Re: My /local dosn't work - by woot - 25.05.2009, 10:25

Forum Jump:


Users browsing this thread: 1 Guest(s)