dcmd_goto
#1

So my code is working only on Playerid 0 :@

I have searched out whole code but i didnt found the problem..

Код:
dcmd_goto(playerid,params[])
{
	new pName[24], str[128];
	GetPlayerName(playerid, pName, sizeof(pName));
	format(str, sizeof(str),PlayerFile,pName);
	if(!(dini_Int(str, "AdminLevel") >= 1))
	{
		SendClientMessage(playerid, COLOR_RED, "Admins Only!");
		return 1;
	}

	new player, name[24];
	if(sscanf(params,"u",player))
	{
		SendClientMessage(playerid, COLOR_RED, "USAGE: /goto [playerid]");
	  return 1;
	}
	if(!IsPlayerConnected(player))
	{
  	SendClientMessage(playerid, COLOR_RED, "Invalid Player ID.");
    return 1;
	}
	if(dini_Int(str, "AdminLevel") >= 1)
	{
	  new Float:X,Float:Y,Float:Z,pint,name2[24],string[40],string2[39];
	  GetPlayerName(player,name2,sizeof(name2));
	  GetPlayerPos(player,X,Y,Z);
	  GetVehiclePos(player,X,Y,Z);
	  pint = GetPlayerInterior(player);
	  SetPlayerPos(playerid,X+1,Y,Z);
	  SetPlayerInterior(playerid,pint);
		format(string,sizeof(string),"You have teleported to %s",name2);
		format(string2,sizeof(string2),"%s has teleported to you",name);
		SendClientMessage(playerid,COLOR_RED,string);
		SendClientMessage(player,COLOR_RED,string2);
	}
	return 1;
}
Reply


Messages In This Thread
dcmd_goto - by GaGlets(R) - 28.02.2010, 18:39
Re: dcmd_goto - by Fabio11 - 28.02.2010, 19:15
Re: dcmd_goto - by GaGlets(R) - 28.02.2010, 19:32
Re: dcmd_goto - by dice7 - 28.02.2010, 19:35
Re: dcmd_goto - by Sergei - 28.02.2010, 19:45

Forum Jump:


Users browsing this thread: 3 Guest(s)