12.07.2013, 10:40
Hello, when using cmd /goto ID can make teleporting and witch vehicle?
Код:
CMD:goto(playerid, params[]) { if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_RED, "SERVER: Nemas prava za koristenje ove komande."); new giveplayerid; if(!IsPlayerConnected(giveplayerid)) return SendClientMessage(playerid, COLOR_RED, "SERVER: Taj igrac nije online."); new Float:gotoX, Float:gotoY, Float:gotoZ; if(sscanf(params, "u", giveplayerid)) return SendClientMessage(playerid, -1, ""COL_GREY"SERVER: Koristi /gotoid [playerid/partofname]"); GetPlayerPos(giveplayerid, gotoX, gotoY, gotoZ); SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(giveplayerid)); SetPlayerInterior(playerid, GetPlayerInterior(giveplayerid)); SetPlayerPos(playerid, gotoX-1, gotoY, gotoZ); SendClientMessage(playerid, -1, ""COL_GREY"SERVER: Teleportiro si se."); return 1; }