Shadow-Of-Waters-Temple
Ученик
Всем привет, пытаюсь сделать команду /gethere в диалоге, как бы ввел команду потом тебе высвечивается диалог надо ввести id или имя игрока и его телепортирует к тебе, но у меня ничего не получается, руки кривые(
Помогите пожалуйста переделать саму команду:
Вот сама команда:
Помогите пожалуйста переделать саму команду:
PHP:
if(strcmp(cmd, "/gethere", true) == 0)
{
if(IsPlayerConnected(playerid))
{
ShowPlayerDialog(playerid, 11012, DIALOG_STYLE_INPUT, "Призыв игрока", "Введите [ID] или имя игрока которого собираетесь призвать к себе:", "Призвать", "Отмена");
}
return true;
}
PHP:
case 11012:
{
if(response)
{
}
else
{
return true;
}
}
PHP:
if(strcmp(cmd, "/gethere", true) == 0)
{
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)) return SendClientMessage(playerid, COLOR_WHITE, "Введите: /gethere [id]");
new Float:plocx,Float:plocy,Float:plocz;
new plo;
new inter = GetPlayerInterior(playerid);
new worldd = GetPlayerVirtualWorld(playerid);
plo = ReturnUser(tmp);
if(IsPlayerConnected(plo))
{
if(plo != INVALID_PLAYER_ID)
{
if(GetPlayerState(plo) != 1 && GetPlayerState(plo) != 2 && GetPlayerState(plo) != 3) return SendClientMessage(playerid, COLOR_GREY, "Игрок не авторизирован");
GetPlayerPos(playerid, plocx, plocy, plocz);
if(PlayerInfo[playerid][pInt] > 0)
{
SetPlayerInterior(plo,inter);
PlayerInfo[plo][pInt] = inter;
PlayerInfo[plo][pLocal] = PlayerInfo[playerid][pLocal];
SetPlayerVirtualWorld(plo,worldd);
}
if(PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(plo,PlayerInfo[playerid][pInt]);
SetPlayerInterior(plo,inter);
SetPlayerVirtualWorld(plo,worldd);
}
if(plocz > 930.0 && PlayerInfo[playerid][pInt] == 0)
{
SetPlayerInterior(plo,inter);
PlayerInfo[plo][pInt] = inter;
}
if(GetPlayerState(plo) == 2)
{
TelePos[plo][0] = 0.0;
TelePos[plo][1] = 0.0;
SetPlayerInterior(plo,inter);
new tmpcar = GetPlayerVehicleID(plo);
SetPlayerVirtualWorld(plo,worldd);
SetVehiclePos(tmpcar, plocx, plocy+4, plocz);
}
else
{
SetPlayerPos(plo,plocx,plocy+2, plocz);
SetPlayerInterior(plo,inter);
SetPlayerVirtualWorld(plo,worldd);
}
SendClientMessage(plo, COLOR_WHITE, "Вы были телепортированы");
}
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Игрок не найден");
}
return true;
}
