07.04.2018, 18:04
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:
(Ignore bugged text, it is in bulgarian)
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; }