/gethere Command Problem
#2

Quote:
Originally Posted by Lixyde
Посмотреть сообщение
So, as the title says, i created the command /gethere, everything work but the teleportation not..

It says the message everything work, but the teleportation not.
Please help, i dont know why it happens like this

Code:
Код:
CMD:gethere(playerid, params[])
{
    if(PlayerInfo[playerid][pAdmin] < 2) return SendClientMessage(playerid,COLOR_GREY, "Трябва да сте поне 2 левел Админ!");
    new target;
    new Float:x, Float:y, Float:z;
    new name[MAX_PLAYER_NAME];
    new name2[MAX_PLAYER_NAME];
    new string[128];
    new string2[128];
    if(sscanf(params, "r", target)) return SendClientMessage(playerid, COLOR_WHITE, "Използвай: {FF1E00}/gethere {FFFFFF}[ID]");
    if(IsPlayerInAnyVehicle(playerid))
    {
          GetPlayerName(playerid, name, sizeof(name));
          GetPlayerName(target, name2, sizeof(name2));
	      GetPlayerPos(target, x, y, z);
	      SetVehiclePos(GetPlayerVehicleID(target), x+1, y+1, z+1);
	      format(string, sizeof(string), "Вие телепортирахте до вас {23FF00}%s{FFFFFF}!", name2);
          SendClientMessage(playerid, COLOR_WHITE, string);
          format(string2, sizeof(string2), "Вие бяхте телепортиран до {23FF00}%s{FFFFFF}!", name);
          SendClientMessage(target, COLOR_WHITE, string2);
    }
    else
    {
          GetPlayerName(playerid, name, sizeof(name));
          GetPlayerName(target, name2, sizeof(name2));
          GetPlayerPos(playerid, x, y, z);
          SetPlayerPos(target, x, y+1, z+1);
          format(string, sizeof(string), "Вие телепортирахте до вас {23FF00}%s{FFFFFF}!", name2);
          SendClientMessage(playerid, COLOR_WHITE, string);
          format(string2, sizeof(string2), "Вие бяхте телепортиран до {23FF00}%s{FFFFFF}!", name);
          SendClientMessage(target, COLOR_WHITE, string2);
	}
    return 1;
}
(Ignore bugged text, it is in bulgarian)
Код:
change if(sscanf(params, "r", target)) on if(sscanf(params, "i", target))
Reply


Messages In This Thread
/gethere Command Problem - by Lixyde - 07.04.2018, 18:04
Re: /gethere Command Problem - by ForCop - 07.04.2018, 19:15
Re: /gethere Command Problem - by Mugala - 07.04.2018, 22:31
Re: /gethere Command Problem - by Logic_ - 07.04.2018, 22:55

Forum Jump:


Users browsing this thread: 1 Guest(s)