Help with Nanites
#2

Код:
OnPlayerCommandText(playerid, cmdtext[])
{
  dcmd(get, 3, cmdtext);
  dcmd(goto, 4, cmdtext);
  return 1;
}

dcmd_get(playerid, params[])
{
  if(!strlen(params)){
    SendClientMessage(playerid, COLOR, "/get [id]");
  }else{
    new pid = strval(params);
    if(IsPlayerConnected(pid)){
      new Float:x, Float:y, Float:z;
      GetPlayerPos(playerid, x, y, z);
      SetPlayerPos(pid, x+1, y+1, z);
    }else{
      SendClientMessage(playerid, COLOR, "Player is not connected");
    }
  }
  return 1;
}

dcmd_goto(playerid, params[])
{
  if(!strlen(params)){
    SendClientMessage(playerid, COLOR, "/goto [id]");
  }else{
    new pid = strval(params);
    if(IsPlayerConnected(pid)){
      new Float:x, Float:y, Float:z;
      GetPlayerPos(pid, x, y, z);
      SetPlayerPos(playerid, x+1, y+1, z);
    }else{
      SendClientMessage(playerid, COLOR, "Player is not connected");
    }
  }
  return 1;
}
Reply


Messages In This Thread
Help with Nanites - by Ali_Dumi - 26.10.2010, 17:52
Re: Help with Nanites - by Sascha - 26.10.2010, 17:58
Re: Help with Nanites - by Ali_Dumi - 26.10.2010, 18:18
Re: Help with Nanites - by Sascha - 26.10.2010, 18:19
Re: Help with Nanites - by Ali_Dumi - 26.10.2010, 18:28
Re: Help with Nanites - by Sascha - 26.10.2010, 18:36
Re: Help with Nanites - by Ali_Dumi - 26.10.2010, 18:43
Re: Help with Nanites - by Ali_Dumi - 27.10.2010, 01:16
Re: Help with Nanites - by Steven82 - 27.10.2010, 04:20
Re: Help with Nanites - by [ED]Drix - 27.10.2010, 05:57

Forum Jump:


Users browsing this thread: 1 Guest(s)