10.03.2012, 15:37
pawn Код:
CMD:gethere(playerid, params[])
{
if(pInfo[playerid][Level] > 2)
{
new
victim,
Float:x,
Float:y,
Float:z
;
GetPlayerPos(playerid, x, y, z);
if(!sscanf(params, "u", victim))
{
if( (IsPlayerConnected(victim)) && (victim != INVALID_PLAYER_ID) && (victim != playerid) )
{
if(!IsPlayerInAnyVehicle(victim)) {
SetPlayerPos(victim, x+1, y+1, z);
SetPlayerVirtualWorld(victim, GetPlayerVirtualWorld(playerid));
SetPlayerInterior(victim, GetPlayerInterior(playerid)); }
else {
SetVehiclePos(GetPlayerVehicleID(victim), x+3, y+3, z);
LinkVehicleToInterior(GetPlayerVehicleID(victim), GetPlayerInterior(playerid));
SetVehicleVirtualWorld(GetPlayerVehicleID(victim), GetPlayerVirtualWorld(playerid)); }
}
else return SendClientMessage(playerid, RED, "ERROR: Player is yourself/disconnected/invalid");
}
else return SendClientMessage(playerid, RED, "USAGE: /gethere [playerid]");
}
else return SendClientMessage(playeird, RED,"ERROR: Level 3 and above only!");
return 1;
}