17.08.2012, 19:32
When I use this /ago [playerid] It works and it teleports me right to the player (he's in derby that time), but I don't see anything except the player that I have teleported. No object... just a weird plain grey color...
Info: M
Info: M
pawn Код:
dcmd_ago(playerid,params[])
{
if(AccInfo[playerid][Level] >= 2 || IsPlayerAdmin(playerid))
{
if(!strlen(params)) return
SendClientMessage(playerid, 0xFFFFFFFF, "{FFFF00}Usage: /ago [PlayerID]") &&
SendClientMessage(playerid, 0xFFFFFFFF, "{FF9900}Function: Will Go to specified player");
new player1;
new string[128];
if(!IsNumeric(params))
player1 = ReturnPlayerID(params);
else player1 = strval(params);
if(IsPlayerConnected(player1) && player1 != INVALID_PLAYER_ID && player1 != playerid)
{
SendCommandToAdmins(playerid,"Ago");
new Float:x, Float:y, Float:z; GetPlayerPos(player1,x,y,z);
SetPlayerInterior(playerid,GetPlayerInterior(player1));
SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(player1));
if(GetPlayerState(playerid) == 2)
{
SetVehiclePos(GetPlayerVehicleID(playerid),x+3,y,z);
LinkVehicleToInterior(GetPlayerVehicleID(playerid),GetPlayerInterior(player1));
SetVehicleVirtualWorld(GetPlayerVehicleID(playerid),GetPlayerVirtualWorld(player1));
}
else SetPlayerPos(playerid,x+2,y,z);
format(string,sizeof(string),"You have Teleported to %s ", pName(player1));
return SendClientMessage(playerid,BlueMsg,string);
}
else return ErrorMessages(playerid, 4);
}
else return ErrorMessages(playerid, 1);
}