11.02.2011, 21:40
Hi, i have 1 problem. Then i teleport to player the interior didn't change(still be 0).
P.S. sry for bad english.
pawn Код:
CMD:to(playerid, params[])
{
new id;
if(playerDB[playerid][admin] || playerDB[playerid][sadmin] ||
playerDB[playerid][gelit] || playerDB[playerid][selit])
{
if (sscanf(params, "u", id)) SendClientMessage(playerid,ZALSVA, "Naudokite: /to [dalis vardo]");
else if (!IsPlayerConnected(id)) SendClientMessage(playerid,0xD9E916FF,"* zaidejas neprisijunges");
else{
new vidus = GetPlayerInterior(id);
SetPlayerInterior(playerid,vidus);
SetPlayerVirtualWorld(playerid, GetPlayerVirtualWorld(id));
new Float:tempcoo[3];
GetPlayerPos(id,tempcoo[0],tempcoo[1],tempcoo[2]);
SetPlayerPos(playerid,tempcoo[0],tempcoo[1],tempcoo[2]);
SetCameraBehindPlayer(playerid);
}
}
return 1;
}
CMD:get(playerid, params[])
{
new id;
if(playerDB[playerid][admin] || playerDB[playerid][sadmin] ||
playerDB[playerid][gelit] || playerDB[playerid][selit])
{
if (sscanf(params, "u", id)) SendClientMessage(playerid,ZALSVA, "Naudokite: /get [id/dalis vardo]");
else if (!IsPlayerConnected(id)) SendClientMessage(playerid,0xD9E916FF,"* zaidejas neprisijunges");
else if (playerDB[id][admin]) SendClientMessage(playerid,ZALSVA, "Administratoriш kilnoti negalima!");
else{
new vidus = GetPlayerInterior(playerid);
SetPlayerInterior(id,vidus);
SetPlayerVirtualWorld(id, GetPlayerVirtualWorld(playerid));
new Float:tempcoo[3];
GetPlayerPos(playerid, tempcoo[0], tempcoo[1], tempcoo[2]);
SetPlayerPos(id, tempcoo[0], tempcoo[1], tempcoo[2]);
SetCameraBehindPlayer(id);
}
}
return 1;
}