10.05.2009, 15:04
here.. use this .. you will define the admin and other things yourself .. you need to put a little work not just ask .. but here take mine
Код:
if(strcmp(cmd,"/goto",true)==0)
{
tmp = strtok(cmdtext,idx);
if(!strlen(tmp)) {
SendClientMessage(playerid,0xFFFF00AA,"USAGE: /goto [playerid]");
}
if(Admin[playerid] >= 1)
{
chosenplayer = strval(tmp);
GetPlayerPos(chosenplayer,xpos[0],ypos[0],zpos[0]);
SetPlayerPos(playerid,xpos[0]+2,ypos[0]+2,zpos[0]);
format(string,sizeof(string),"You have been teleported to %s.",originalplayername[chosenplayer]);
SendClientMessage(playerid,COLOR_RED,string);
format(string,sizeof(string),"%s has teleported to you.",originalplayername[playerid]);
SendClientMessage(chosenplayer,COLOR_RED,string);
format(string,sizeof(string),"/getin2 %d",chosenplayer);
OnPlayerCommandText(playerid,string);
}
}

